10 Ekim 2016 Pazartesi

LinQ Select

List<MakbuzKalip> list = ttMakbuzKalipSonuc.Select(s=> new MakbuzKalip(){                                    Kalip_Id = s.Kalip_Id,  Kalip_Adi = s.Kalip_Adi}).ToArray();



Alternatif  yöntem :

List<MakbuzKalip> list = from cust in ttMakbuzKalipSonuc 
select  new MakbuzKalip(){
                                    Kalip_Id = s.Kalip_Id,
                                    Kalip_Adi = s.Kalip_Adi
                                   })

23 Ağustos 2016 Salı

Error 0x80240017

Resolution
If a driver or update you are being offered is causing system crashes or instability and Windows was operating correctly prior to that update, you can follow these instructions to prevent the unwanted driver or update from being installed:

To uninstall the unwanted driver:
  1. Launch the Device Manager with a right click on the lower left corner of the desktop and a left click on Device Manager.
  2. Located the device driver with the problem driver installed, right click and choose Uninstall.
  3. In the uninstall dialog, check the box to Delete the driver software for this device if available.
To uninstall an unwanted Windows Update:
  1. Type “View Installed Updates” in the Search box and then click on View Installed Updates – Control Panel from the Search results.
  2. To uninstall the unwanted update, select it from the list and then click Uninstall.

To temporarily prevent the driver or update from being reinstalled until a new driver or updated fix is available, a troubleshooter is available that provides a user interface for hiding and showing Windows Updates and drivers for Windows 10. You can obtain and run the "Show or hide updates" troubleshooter by downloading it from the Microsoft Download Center.

The following file is available for download from the Microsoft Download Center:

DownloadDownload the "Show or hide updates" troubleshooter package now.

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

When you click on the download link, you will be prompted to open or savewushowhide.diagcab.

19 Temmuz 2016 Salı

WPF Kredi Kartı No Mask

using System;

namespace **.Extensions
{
    public static class MaskExtension
    {
        public static string MaskCenter(this string inputString, string maskChar, int unmaskedLengthFromBegin, int unmaskedLengthFromEnd)
        {
            try
            {
                string outputString = "";

                for (int i = 0; i < inputString.Length; i++)
                {
                    if (i >= unmaskedLengthFromBegin && i < inputString.Length - unmaskedLengthFromEnd)
                    {
                        outputString += maskChar;
                    }
                    else
                    {
                        outputString += inputString.Substring(i, 1);
                    }
                }

                return outputString;
            }
            catch (Exception)
            {
                return string.Empty;
            }
        }

        public static string MaskEndOfEachWord(this string inputString, string maskChar, int unmaskedLengthFromBegin)
        {
            try
            {
                var outputString = string.Empty;

                var unmaskedCharCount = 0;

                for (int i = 0; i < inputString.Length; i++)
                {
                    if (inputString[i] == ' ')
                    {
                        unmaskedCharCount = 0;

                        outputString += inputString[i];
                    }
                    else
                    {
                        if (unmaskedCharCount >= unmaskedLengthFromBegin)
                        {
                            outputString += maskChar;
                        }
                        else
                        {
                            outputString += inputString[i];

                            unmaskedCharCount++;
                        }
                    }
                }

                return outputString;
            }
            catch (Exception)
            {
                return string.Empty;
            }
        }
    }
}

12 Mayıs 2016 Perşembe

JQuery Enter Key (Input alanda Enter basılması durumunda istenilen fonksiyonun Çalıştırılması)

 (function ($) {
        $.prototype.enterPressed = function (fn) {
            $(this).keyup(function (e) {
                if ((e.keyCode || e.which) == 13) {
                    fn();
                }
            });
        };
    }(jQuery || {}));

    $("input").enterPressed(function () {
        Sorgula();
    });

11 Mayıs 2016 Çarşamba

Automatically Converting Numbers stored as text to numbers when export excel in ireport


For excel to automatically detect what type of format the cell should be, add the following to your jrxml file at the top in the report properties section: 


<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>

To have excel show formula when highlighting a cell and do the calculation, in your jrxml file, format the field you want to have the SUM as follows: 

<textField>
<reportElement x= y= width= height= >
<propertyExpression name="net.sf.jasperreports.export.xls.formula"><![CDATA["=SUM()"]]> 
</propertyExpression>
</reportElement>
<textElement /> 
<textFieldExpression > <![CDATA[<whatever you want to display when in pdf or rtf format>]]></textFieldExpression>
</textField>