Ejemplo n.º 1
0
 public Doc_ShopC_Item(long xStock_ID, DataRow[] drs_DocInvoice, DataRow[] drs_DocProformaInvoice)
 {
     Stock_ID = xStock_ID;
     int iCount1 = drs_DocInvoice.Length;
     int iCount2 = drs_DocProformaInvoice.Length;
     int iCountAll = iCount1 + iCount2;
     if (iCountAll > 0)
     {
         adata = new Doc_ShopC_Item_Data[iCountAll];
         int i = 0;
         while (i< iCount1)
         {
             adata[i] = new Doc_ShopC_Item_Data((long)drs_DocInvoice[i]["DocInvoice_ID"],
                                                (long)drs_DocInvoice[i]["ID"],
                                                -1,
                                                -1);
             i++;
         }
         int j = 0;
         while (j < iCount2)
         {
             adata[i] = new Doc_ShopC_Item_Data(-1,
                                                -1,
                                                (long)drs_DocProformaInvoice[j]["DocProformaInvoice_ID"],
                                                (long)drs_DocProformaInvoice[j]["ID"]);
             i++;
             j++;
         }
     }
 }
        public Form_Show_Documents_Where_stock_item_was_sold_or_reserved(long xStock_ID, Doc_ShopC_Item_Data[] xadata)
        {
            InitializeComponent();
            Stock_ID = xStock_ID;
            adata = xadata;
            dcol_DocumentType = new DataColumn("DocumentType", typeof(bool));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_DocumentType);

            dcol_DocumentTypeName = new DataColumn("DocumentTypeName", typeof(string));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_DocumentTypeName);

            dcol_Addressee = new DataColumn("Addressee", typeof(string));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_Addressee);

            dcol_Draft = new DataColumn("Draft", typeof(bool));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_Draft);

            dcol_DraftNumber = new DataColumn("DraftNumber", typeof(long));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_DraftNumber);

            dcol_FinancialYear = new DataColumn("FinancialYear", typeof(long));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_FinancialYear);

            dcol_NumberInFinancialYear = new DataColumn("NumberInFinancialYear", typeof(long));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_NumberInFinancialYear);

            dcol_Item_UniqueName = new DataColumn("Item_UniqueName", typeof(string));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_Item_UniqueName);

            dcol_StockTakeName = new DataColumn("StockTakeName", typeof(string));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_StockTakeName);

            dcol_QuantityTakenFromStock = new DataColumn("QuantityTakenFromStock", typeof(decimal));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_QuantityTakenFromStock);

            dcol_ExpiryDate = new DataColumn("ExpiryDate", typeof(DateTime));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_ExpiryDate);

            dcol_StockTakeDate = new DataColumn("StockTakeDate", typeof(DateTime));
            dt_Where_stock_item_was_sold_or_reserved.Columns.Add(dcol_StockTakeDate);

            lngRPM.s_Form_Show_Documents_Where_stock_item_was_sold_or_reserved.Text(this);
        }