24 Haziran 2015 Çarşamba

.NET Türkiye Para değeri ayarlama

Dim auction_price As Double = Double.Parse(item(DAAuctions.FLD_auction_price).Text) item(DAAuctions.FLD_auction_price).Text = auction_price.ToString("#,##0")

14 Mayıs 2015 Perşembe

Chrome, Mozilla ve Explorer için 8 karakter boşluk bırakma

//Markup Kodu
  <telerik:RadEditor ID="txtRADEditor1" OnClientLoad="Editor_OnClientLoad1" runat="server" Height="100" Width="682px" ToolbarMode="ShowOnFocus" StripFormattingOptions="MSWordRemoveAll"  
                                 OnClientCommandExecuting="HTMLEditor_OnClientCommandExecuting" EnableResize="false" AutoResizeHeight="false" OnClientPasteHtml="OnClientPasteHtml">  
                                 <RealFontSizes>  
                                   <telerik:EditorRealFontSize Value="8px" />  
                                   <telerik:EditorRealFontSize Value="9px" />  
                                   <telerik:EditorRealFontSize Value="10px" />  
                                   <telerik:EditorRealFontSize Value="11px" />  
                                   <telerik:EditorRealFontSize Value="12px" />  
                                   <telerik:EditorRealFontSize Value="14px" />  
                                   <telerik:EditorRealFontSize Value="16px" />  
                                 </RealFontSizes>  
                               </telerik:RadEditor>  



//Java Script Kodu

function Editor_Tab_Press_For_Firefox(editor, args) {

    if (browser.isMozilla) {
        editor.attachEventHandler("onkeydown", function (e) {
            if (e.keyCode == '9') {
                editor.pasteHtml("&nbsp;&nbsp;&nbsp;&nbsp;");
                e.preventDefault();
                e.cancelBubble = true;
                e.stopPropagation();
            }
        });
    }
}

function Editor_OnClientLoad1(editor, args) {
    call_editor_1_justifyfull = true;

    editor.attachEventHandler("onkeydown", function (e) {
        if (e.keyCode == '9') {
            editor.pasteHtml("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
            e.preventDefault();
            e.cancelBubble = true;
            e.stopPropagation();
        }
    });

    Editor_Tab_Press_For_Firefox(editor, args);

    if (browser.isChrome) {
        editor.attachEventHandler("onkeydown", function (e) {
            if (e.keyCode == '9') {
                editor.pasteHtml("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
                e.preventDefault();
                e.cancelBubble = true;
                e.stopPropagation();
            }
        });
    }
}

7 Nisan 2015 Salı

Winodws Service Installer and UnInstaller

InstallUnit.exe olduğu klasör
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319

Windows Servisi Kurma 
installutil  "C:\Sources\CBK\CBK.enVision\CBK.enVision.UtilityApps\enVision.DTVT.Service\enVision.DTVT.Service\bin\enVision.DTVT.Service.exe"

Windows Servisi Çalıştırma
net start "DtvtService"

Windows Servisi Kaldırma
installutil  /u "C:\Sources\CBK\CBK.enVision\CBK.enVision.UtilityApps\enVision.DTVT.Service\enVision.DTVT.Service\bin\enVision.DTVT.Service.exe"

26 Mart 2015 Perşembe

Örnek ASP.NET'ten Excel'e Aktarım

FaaliyetList = new BusinessManager().SEARCH_FAALIYET(strBaslangicTarihi, strBitisTarihi, strIl, FaaliyetTipiId);

       
            StringBuilder icerik = new StringBuilder();

            icerik.Append("<table border='1'>" +
            "<tr style='text-align:center; font-weight: bold; background-color: black; color: white;'>" +
            "<td>Nitelik</td>" +
            "<td>İl</td>" +
            "<td>Faaliyet Tipi </td>"+
            "<td>Baslangıç Tarihi</td>" +
            "<td>Bitiş Tarihi</td>" +
            "</tr>"
            );

            foreach (var item in FaaliyetList)
            {
                icerik.Append("<tr>");
                icerik.Append("<td>" + item.Id.ToString() + "</td>");
                icerik.Append("<td>" + item.Nitelik + "</td>");
                icerik.Append("<td>" + item.FaaliyetTipiAdi + "</td>");
                icerik.Append("<td>" + item.BaslangicTarihi.ToShortDateString() + "</td>");
                 icerik.Append("<td>" + item.BitisTarihi.ToShortDateString() + "</td>");
                icerik.Append("</tr>");

            }

            icerik.Append("</table>");


            Response.Clear();

            Response.ClearHeaders();

            Response.ClearContent();

            Response.Cache.SetCacheability(

            HttpCacheability.NoCache);
            Response.ContentEncoding = System.Text.

            Encoding.GetEncoding("windows-1254");
            Response.Charset =

            "windows-1254";
            Response.Buffer =

            true;


            this.EnableViewState = false;
            Response.ContentType =

            "application/vnd.xls";


            string filename = "Stok_" + System.DateTime.Now.ToShortDateString() + ".xls";
            Response.AddHeader(

            "content-disposition", "attachment;filename= " + filename);


            string header = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1254\" />\n<style>\n</style>\n</head>\n<body>\n";
            Response.Write(header + icerik);

            Response.End();

24 Şubat 2015 Salı

ASP.NET MVC Life Cycle


1) HTTP Request: Sizin her ASP.NET MVC uygulamasını görüntülemek istemeniz bir request(istek) tir.Bu istediğinizi HTTP üzerinden IIS tarafından alınır. Her yaptığınız istek Server tarafından bir yanıtlason bulması gerekir.

2) Routing: ASP.NET MVC uygulamasını her istek yaptığınızda, yaptığınız yanıt UrlRoutingModule HTTP Module tarafından durdurulur. UrlRoutingModule bir isteği durdurduğu zaman, gelen istek RouteTable’dan hangi Controller tarafından üstleneceğine karar verilir.

3) Controller: RouteTable’dan gelen route bilgisine göre Controller hangi Action’ı çalıştıracaksa o
View çalıştırılır. View, Controller tarafından render edilmez. Controller tarafından geriye ViewResult
döndürülür.

4) ViewResult: ViewResult, View’i render etmek için aktif View Engine’i çağırır.

5) ViewEngine : Bir CSHTML dosyayı oluşturduğunuzda içerisindeki script ve markuplar, Razor View Engin tarafından bazı ASP.NET API’lerini sayfalarınızı HTML’e çevirmek için kullanır.

6) View: View Engine tarafından HTML’e çevirilen kodlar kullanıcıya sunulur.


7) Response: HTTP üzerinden View kullanıcıya gösterilir

12 Ocak 2015 Pazartesi

Unable to ping server at localhost 1099

IntelliJ IDEA, Gradle ve TomCat ile çalışırken bu hata aldığınızda bilgisayarımızda bulunan JAVA_HOME bulunan jdk 'nin son sürüm adresi ile değiştirdim.Sorun çözüldü.ect/hosts ayarları bunu yapmadan dokunmayınız.

18 Aralık 2014 Perşembe

TOAD ORA-12154 Hatası Çözümü

ORA-12154: TNS:could not resolve the connect identifier ”
 
Windows Vista veya Windows 7  64 bit sistemde çalışmayan Toad programının ile ilgili
"C:\Program Files (x86)\Quest Software"  dizindeki klasörünü
"C:\Program Files"    dizinine kes yapıştır yapıyoruz. Toad'ın ORA-12154 hatası düzelecektir.