1 Nisan 2017 Cumartesi

VS 2015 : ?. ve ?[ Operatörleri

int? length = customers?.Length; // customers null ise null değilse customers.Length
Customer first = customers?[0];  // customers null ise null değilse customers[0]
int? count = customers?[0]?.Orders?.Count();  // customers, customers[0], customers[0].Orders null ise null değilse customers[0].Orders.Count()

WPF Ekran Resmi alma

public static void MultipleScreenCapture(string filename)
{
    var ss = new Bitmap(SystemInformation.VirtualScreen.Width,
                        SystemInformation.VirtualScreen.Height,
                        PixelFormat.Format32bppArgb);
  
    Graphics.FromImage(ss).CopyFromScreen(SystemInformation.VirtualScreen.X,
                                          SystemInformation.VirtualScreen.Y,
                                          0,
                                          0,
                                          SystemInformation.VirtualScreen.Size,
                                          CopyPixelOperation.SourceCopy);
  
    ss.Save(filename, ImageFormat.Png);
}

25 Ocak 2017 Çarşamba

PL-SQL Table Create

CREATE TABLE OD_TABLE
( SEQ_NO NUMBER(12) not null,
  colum2 varchar2(50) not null,
 colum3 varchar2(50),
 colum4 varchar2(50),
 colum5 varchar2(50),
 colum6 varchar2(50),
  colum7 varchar2(50),
  colum8 varchar2(4000),
  CRE_USER varchar2(50),
  CONSTRAINT OD_TABLE_pk PRIMARY KEY (SEQ_NO)
);


CREATE TABLE OD_TABLE (select * from table_name)

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();
    });