İşemri Açma

using System;
using System.Runtime.InteropServices;
using NetOpenX50;
namespace NetOpenXTest
{
    public static class IsEmriOrnek
    {
       public static void IsEmriKaydet()
       {
           Kernel kernel = new Kernel();
           Sirket sirket = default(Sirket);
           IsEmri Isemri = default(IsEmri);
           try
           {
               sirket = kernel.yeniSirket(TVTTipi.vtMSSQL,
                                               "vt adi",
                                               "vt kull adi",
                                               "vt kull sifre",
                                               "netsis kull adi",
                                               "netsis sifre",
                                               0);
               Isemri = kernel.yeniIsEmri(sirket);
               Isemri.IsEmriNo = "X00000000000018";               
               Isemri.Tarih = Convert.ToDateTime("2015-01-01");
               Isemri.StokKodu = "M1";
               Isemri.Miktar = 100;
               Isemri.SiparisNo = "A00000000001162"// Müşteri sipariş no
               Isemri.SipKont = 2;                    // Müşteri sipariş sıra no
               Isemri.TeslimTarihi = Convert.ToDateTime("2015-01-02");
               Isemri.kayitYeni();
           }
           catch (Exception ex)
           {
               MessageBox.Show(ex.Message);
           }
           finally
           {
               Marshal.ReleaseComObject(Isemri);
               Marshal.ReleaseComObject(sirket);
               kernel.FreeNetsisLibrary();
               Marshal.ReleaseComObject(kernel);
           }
       }
    }
}

Bu makaleyi yararlı buldunuz mu?