Esempio n. 1
0
        public Boolean Add(string fileName, string text)
        {
            try
            {
                SqlParameter[] sp =
                {
                    new SqlParameter("@Action",                  SqlDbType.NVarChar, 255),
                    new SqlParameter("@Serialkey",               SqlDbType.Int,        4),
                    new SqlParameter("@Table_Indicator",         SqlDbType.Int,        4),
                    new SqlParameter("@Action_Code",             SqlDbType.Char,       1),
                    new SqlParameter("@Lsp_Identification",      SqlDbType.Char,       1),
                    new SqlParameter("@Article_Number",          SqlDbType.Char,       8),
                    new SqlParameter("@Barcode",                 SqlDbType.Char,      14),
                    new SqlParameter("@Warehouse_Number",        SqlDbType.Char,       6),
                    new SqlParameter("@Date_Record",             SqlDbType.Date,       3),
                    new SqlParameter("@Barcode_Sequence_Number", SqlDbType.Int,        4),
                    new SqlParameter("@Editdate",                SqlDbType.DateTime,   8),
                    new SqlParameter("@AddDate",                 SqlDbType.DateTime,   8),
                    new SqlParameter("@FILENAME",                SqlDbType.NVarChar, 200),
                };
                sp[0].Value = "Addnew";

                sp[1].Value = this.Serialkey;

                sp[2].Value = this.Table_Indicator;

                sp[3].Value = this.Action_Code;

                sp[4].Value = this.Lsp_Identification;

                sp[5].Value = this.Article_Number;

                sp[6].Value = this.Barcode;

                sp[7].Value = this.Warehouse_Number;

                sp[8].Value = this.Date_Record;

                sp[9].Value = this.Barcode_Sequence_Number;

                sp[10].Value = this.Editdate;

                sp[11].Value = this.AddDate;

                sp[12].Value = this.FILENAME;


                DAL.excutequery(PP_MM_Barcode_Articles, sp, CommandType.StoredProcedure);
                return(true);
            }
            catch (Exception e)
            {
                string category             = "Barcode_Article";
                ResultDatabase_Model result = new ResultDatabase_Model();
                result.HandleError(fileName, text, e.Message.ToString(), this.Barcode, category);
                return(false);
            }
        }
Esempio n. 2
0
        public Boolean Update(string fileName, string text)
        {
            try
            {
                SqlParameter[] sp =
                {
                    new SqlParameter("@Action",                   SqlDbType.NVarChar, 255),
                    new SqlParameter("@Serialkey",                SqlDbType.Int,        4),
                    new SqlParameter("@Table_Indicator",          SqlDbType.Int,        4),
                    new SqlParameter("@Action_Code",              SqlDbType.Char,       1),
                    new SqlParameter("@Lsp_Identification",       SqlDbType.Char,       1),
                    new SqlParameter("@Supplier_Code",            SqlDbType.Char,       6),
                    new SqlParameter("@Address_Indicator",        SqlDbType.Int,        4),
                    new SqlParameter("@Contact_Person",           SqlDbType.Char,      35),
                    new SqlParameter("@Building",                 SqlDbType.Char,      28),
                    new SqlParameter("@Address",                  SqlDbType.Char,      28),
                    new SqlParameter("@Town",                     SqlDbType.Char,      25),
                    new SqlParameter("@Phone",                    SqlDbType.Char,      15),
                    new SqlParameter("@Fax_Number",               SqlDbType.Char,      18),
                    new SqlParameter("@Postal_Code",              SqlDbType.Char,      11),
                    new SqlParameter("@DC_Phone_Number",          SqlDbType.Char,      15),
                    new SqlParameter("@Origin",                   SqlDbType.Char,       4),
                    new SqlParameter("@Supplier_Repressentative", SqlDbType.Char,      35),
                    new SqlParameter("@Warehouse_Number",         SqlDbType.Char,       5),
                    new SqlParameter("@Date_Record",              SqlDbType.Date,       3),
                    new SqlParameter("@Email_Address",            SqlDbType.Char,     100),
                    new SqlParameter("@Editdate",                 SqlDbType.DateTime,   8),
                    new SqlParameter("@BLANK1",                   SqlDbType.Char,       7),
                    new SqlParameter("@BLANK2",                   SqlDbType.Char,      11),
                    new SqlParameter("@FILENAME",                 SqlDbType.NVarChar, 200),
                };
                sp[0].Value = "Update";

                sp[1].Value = this.Serialkey;

                sp[2].Value = this.Table_Indicator;

                sp[3].Value = this.Action_Code;

                sp[4].Value = this.Lsp_Identification;

                sp[5].Value = this.Supplier_Code;

                sp[6].Value = this.Address_Indicator;

                sp[7].Value = this.Contact_Person;

                sp[8].Value = this.Building;

                sp[9].Value = this.Address;

                sp[10].Value = this.Town;

                sp[11].Value = this.Phone;

                sp[12].Value = this.Fax_Number;

                sp[13].Value = this.Postal_Code;

                sp[14].Value = this.DC_Phone_Number;

                sp[15].Value = this.Origin;

                sp[16].Value = this.Supplier_Repressentative;

                sp[17].Value = this.Warehouse_Number;

                sp[18].Value = this.Date_Record;

                sp[19].Value = this.Email_Address;

                sp[20].Value = this.Editdate;

                sp[21].Value = this.BLANK1;

                sp[22].Value = this.BLANK2;

                sp[23].Value = this.FILENAME;



                DAL.excutequery(PP_MM_Supplier_Detail, sp, CommandType.StoredProcedure);
                return(true);
            }
            catch (Exception e)
            {
                string category             = "SUPPLIER_DETAIL";
                ResultDatabase_Model result = new ResultDatabase_Model();
                result.HandleError(fileName, text, e.Message.ToString(), this.Supplier_Code, category);
                return(false);
            }
        }
        public Boolean Update(string fileName, string text)
        {
            try
            {
                SqlParameter[] sp =
                {
                    new SqlParameter("@Action",                     SqlDbType.NVarChar, 255),
                    new SqlParameter("@Serialkey",                  SqlDbType.Int,        4),
                    new SqlParameter("@Table_Indicator",            SqlDbType.Int,        4),
                    new SqlParameter("@Lsp_Identification",         SqlDbType.Char,       4),
                    new SqlParameter("@Order_Number",               SqlDbType.Char,      17),
                    new SqlParameter("@Order_Type",                 SqlDbType.Char,       4),
                    new SqlParameter("@Store_Number",               SqlDbType.Char,       5),
                    new SqlParameter("@Plan_Delivery_Date",         SqlDbType.Date,       3),
                    new SqlParameter("@Warehouse_Number",           SqlDbType.Char,       6),
                    new SqlParameter("@MM_Email_Number",            SqlDbType.Char,       5),
                    new SqlParameter("@Memo_Field",                 SqlDbType.Char,      60),
                    new SqlParameter("@Date_Record",                SqlDbType.Date,       3),
                    new SqlParameter("@Action_Type",                SqlDbType.Char,       1),
                    new SqlParameter("@Commercial_Supplier_Number", SqlDbType.Char,       6),
                    new SqlParameter("@Plan_Delivery_To_Warehouse", SqlDbType.Date,       3),
                    new SqlParameter("@Order_Date",                 SqlDbType.Date,       3),
                    new SqlParameter("@Free_Text1",                 SqlDbType.Char,      20),
                    new SqlParameter("@Free_Text2",                 SqlDbType.Char,      20),
                    new SqlParameter("@Order_Logistic_Type",        SqlDbType.Int,        4),
                    new SqlParameter("@Customer_Store_Number",      SqlDbType.Int,        4),
                    new SqlParameter("@Customer_Number",            SqlDbType.Char,       6),
                    new SqlParameter("@EDITDATE",                   SqlDbType.DateTime,   8),
                    // new SqlParameter( "@STATUS", SqlDbType.NChar, 20),
                    new SqlParameter("@FILENAME",                   SqlDbType.NVarChar, 100),
                };
                sp[0].Value = "Update";

                sp[1].Value = this.Serialkey;

                sp[2].Value = this.Table_Indicator;

                sp[3].Value = this.Lsp_Identification;

                sp[4].Value = this.Order_Number;

                sp[5].Value = this.Order_Type;

                sp[6].Value = this.Store_Number;

                sp[7].Value = this.Plan_Delivery_Date;

                sp[8].Value = this.Warehouse_Number;

                sp[9].Value = this.MM_Email_Number;

                sp[10].Value = this.Memo_Field;

                sp[11].Value = this.Date_Record;

                sp[12].Value = this.Action_Type;

                sp[13].Value = this.Commercial_Supplier_Number;

                sp[14].Value = this.Plan_Delivery_To_Warehouse;

                sp[15].Value = this.Order_Date;

                sp[16].Value = this.Free_Text1;

                sp[17].Value = this.Free_Text2;

                sp[18].Value = this.Order_Logistic_Type;

                sp[19].Value = this.Customer_Store_Number;

                sp[20].Value = this.Customer_Number;

                sp[21].Value = this.EDITDATE;

                //sp[22].Value = this.STATUS;

                sp[22].Value = this.FILENAME;

                DAL.excutequery(PP_MM_Orders_Header, sp, CommandType.StoredProcedure);
                return(true);
            }
            catch (Exception e)
            {
                string category             = "Order_Header";
                ResultDatabase_Model result = new ResultDatabase_Model();
                result.HandleError(fileName, text, e.Message.ToString(), this.Order_Number, category);
                return(false);
            }
        }
Esempio n. 4
0
        public Boolean Update(string fileName, string text)
        {
            try
            {
                SqlParameter[] sp =
                {
                    new SqlParameter("@Action",                SqlDbType.NVarChar, 255),
                    new SqlParameter("@Serialkey",             SqlDbType.Int,        4),
                    new SqlParameter("@Table_Indicator",       SqlDbType.Int,        4),
                    new SqlParameter("@Lsp_Identification",    SqlDbType.Char,       4),
                    new SqlParameter("@Order_Number",          SqlDbType.Char,      17),
                    new SqlParameter("@Store_Number",          SqlDbType.Char,       5),
                    new SqlParameter("@Article_Number",        SqlDbType.Char,       8),
                    new SqlParameter("@Order_Quantity",        SqlDbType.Decimal,    9),
                    new SqlParameter("@Date_Record",           SqlDbType.Date,       3),
                    new SqlParameter("@Action_Code",           SqlDbType.Char,       1),
                    new SqlParameter("@Warehouse_Number",      SqlDbType.Char,       6),
                    new SqlParameter("@Orderline_Fretext",     SqlDbType.Char,      15),
                    new SqlParameter("@Purchase_Order",        SqlDbType.Char,      12),
                    new SqlParameter("@MM_Mail_Number",        SqlDbType.Char,       5),
                    new SqlParameter("@Buying_Article_Number", SqlDbType.Char,       8),
                    new SqlParameter("@Article_Selling_Price", SqlDbType.Decimal,    9),
                    new SqlParameter("@EDITDATE",              SqlDbType.DateTime,   8),
                    // new SqlParameter( "@STATUS", SqlDbType.NChar, 20),
                    new SqlParameter("@FILENAME",              SqlDbType.NVarChar, 100),
                };
                sp[0].Value = "Update";

                sp[1].Value = this.Serialkey;

                sp[2].Value = this.Table_Indicator;

                sp[3].Value = this.Lsp_Identification;

                sp[4].Value = this.Order_Number;

                sp[5].Value = this.Store_Number;

                sp[6].Value = this.Article_Number;

                sp[7].Value = this.Order_Quantity;

                sp[8].Value = this.Date_Record;

                sp[9].Value = this.Action_Code;

                sp[10].Value = this.Warehouse_Number;

                sp[11].Value = this.Orderline_Fretext;

                sp[12].Value = this.Purchase_Order;

                sp[13].Value = this.MM_Mail_Number;

                sp[14].Value = this.Buying_Article_Number;

                sp[15].Value = this.Article_Selling_Price;

                sp[16].Value = this.EDITDATE;

                //sp[17].Value = this.STATUS;

                sp[17].Value = this.FILENAME;

                DAL.excutequery(PP_MM_Orders_Detail, sp, CommandType.StoredProcedure);
                return(true);
            }
            catch (Exception e)
            {
                string category             = "Order_Detail";
                ResultDatabase_Model result = new ResultDatabase_Model();
                result.HandleError(fileName, text, e.Message.ToString(), this.Order_Number, category);
                return(false);
            }
        }
Esempio n. 5
0
        public Boolean Update(string fileName, string text)
        {
            try
            {
                SqlParameter[] sp =
                {
                    new SqlParameter("@Action",             SqlDbType.NVarChar, 255),
                    new SqlParameter("@Serialkey",          SqlDbType.Int,        4),
                    new SqlParameter("@Table_Indicator",    SqlDbType.Int,        4),
                    new SqlParameter("@Lsp_Identification", SqlDbType.Char,       4),
                    new SqlParameter("@Order_Number",       SqlDbType.Char,      17),
                    new SqlParameter("@Article_Number",     SqlDbType.Char,       8),
                    new SqlParameter("@Order_Quantity",     SqlDbType.Decimal,    9),
                    new SqlParameter("@Date_Record",        SqlDbType.Date,       3),
                    new SqlParameter("@Action_Type",        SqlDbType.Char,       1),
                    new SqlParameter("@Warehouse_Number",   SqlDbType.Char,       6),
                    new SqlParameter("@Orderline",          SqlDbType.Char,      20),
                    new SqlParameter("@MM_Email_Number",    SqlDbType.Char,       5),
                    new SqlParameter("@EDITDATE",           SqlDbType.DateTime,   8),
                    new SqlParameter("@BLANK1",             SqlDbType.Char,      38),
                    new SqlParameter("@BLANK2",             SqlDbType.Char,       8),
                    new SqlParameter("@BLANK10",            SqlDbType.Char,      10),
                    new SqlParameter("@FILENAME",           SqlDbType.NVarChar, 200)
                };
                sp[0].Value = "Update";

                sp[1].Value = this.Serialkey;

                sp[2].Value = this.Table_Indicator;

                sp[3].Value = this.Lsp_Identification;

                sp[4].Value = this.Order_Number;

                sp[5].Value = this.Article_Number;

                sp[6].Value = this.Order_Quantity;

                sp[7].Value = this.Date_Record;

                sp[8].Value = this.Action_Type;

                sp[9].Value = this.Warehouse_Number;

                sp[10].Value = this.Orderline;

                sp[11].Value = this.MM_Email_Number;

                sp[12].Value = this.EDITDATE;

                sp[13].Value = this.BLANK1;

                sp[14].Value = this.BLANK2;

                sp[15].Value = this.BLANK10;

                sp[16].Value = this.FILENAME;

                DAL.excutequery(PP_MM_PO_Detail, sp, CommandType.StoredProcedure);
                return(true);
            }
            catch (Exception e)
            {
                string category             = "PO_DETAIL";
                ResultDatabase_Model result = new ResultDatabase_Model();
                result.HandleError(fileName, text, e.Message.ToString(), this.Order_Number, category);
                return(false);
            }
        }
Esempio n. 6
0
        public Boolean Update(string fileName, string text)
        {
            try
            {
                SqlParameter[] sp =
                {
                    new SqlParameter("@Action",                         SqlDbType.NVarChar, 255),
                    new SqlParameter("@Serialkey",                      SqlDbType.Int,        4),
                    new SqlParameter("@Table_Indicator",                SqlDbType.Int,        4),
                    new SqlParameter("@Action_Code",                    SqlDbType.Char,       4),
                    new SqlParameter("@Lsp_Identification",             SqlDbType.Char,       1),
                    new SqlParameter("@Article_Number",                 SqlDbType.Char,       8),
                    new SqlParameter("@Supplier_Code",                  SqlDbType.Char,       6),
                    new SqlParameter("@Buying_Unit",                    SqlDbType.Decimal,   13),
                    new SqlParameter("@Selling_Unit",                   SqlDbType.Int,        4),
                    new SqlParameter("@Ordering_Unit",                  SqlDbType.Char,       3),
                    new SqlParameter("@Article_Type",                   SqlDbType.Int,        4),
                    new SqlParameter("@Article_Status",                 SqlDbType.Int,        4),
                    new SqlParameter("@Buyer_User_Id",                  SqlDbType.Char,       6),
                    new SqlParameter("@Desc_Article",                   SqlDbType.Char,      33),
                    new SqlParameter("@Packing_type_Article",           SqlDbType.Char,       2),
                    new SqlParameter("@Article_Related",                SqlDbType.Int,        4),
                    new SqlParameter("@EAN_Code",                       SqlDbType.Char,      14),
                    new SqlParameter("@Supplier_Article_Number",        SqlDbType.Char,       8),
                    new SqlParameter("@Article_Desc",                   SqlDbType.Char,      33),
                    new SqlParameter("@Number_Mu_Carton",               SqlDbType.Int,        4),
                    new SqlParameter("@Number_Mu_Layer",                SqlDbType.Int,        4),
                    new SqlParameter("@Number_Mu_Pallet",               SqlDbType.Int,        4),
                    new SqlParameter("@Carton_Length",                  SqlDbType.Decimal,   13),
                    new SqlParameter("@Carton_GrossWeight",             SqlDbType.Decimal,   13),
                    new SqlParameter("@Carton_NetWeight",               SqlDbType.Decimal,   13),
                    new SqlParameter("@Warehouse_Number",               SqlDbType.Char,       5),
                    new SqlParameter("@Date_Record",                    SqlDbType.Date,       3),
                    new SqlParameter("@Logistic_Deposit_Type",          SqlDbType.Int,        4),
                    new SqlParameter("@Logistic_Flow_Indicator",        SqlDbType.Int,        4),
                    new SqlParameter("@Ordering_Indicator",             SqlDbType.Int,        4),
                    new SqlParameter("@Link_Logistic_Deposit",          SqlDbType.Int,        4),
                    new SqlParameter("@Expiry_Days",                    SqlDbType.Int,        4),
                    new SqlParameter("@Expiry_Days_Checking_Indicator", SqlDbType.Int,        4),
                    new SqlParameter("@Minimum_Expiry_Days",            SqlDbType.Int,        4),
                    new SqlParameter("@Pallet_Indicator",               SqlDbType.Int,        4),
                    new SqlParameter("@Number_Layer_Pallet",            SqlDbType.Int,        4),
                    new SqlParameter("@Number_Units_Inbox",             SqlDbType.Int,        4),
                    new SqlParameter("@Gross_Volume",                   SqlDbType.Decimal,   13),
                    new SqlParameter("@Measure_Unit_GrossVolume",       SqlDbType.Char,       3),
                    new SqlParameter("@Packing_Type",                   SqlDbType.Char,       2),
                    new SqlParameter("@Carton_Width",                   SqlDbType.Decimal,   13),
                    new SqlParameter("@Carton_Height",                  SqlDbType.Decimal,   13),
                    new SqlParameter("@UOM_Carton_Size",                SqlDbType.Char,       3),
                    new SqlParameter("@UOM_Carton_Weight",              SqlDbType.Char,       3),
                    new SqlParameter("@Carton_Gross_Volume",            SqlDbType.Decimal,   13),
                    new SqlParameter("@UOM_Carton_Volume",              SqlDbType.Char,       3),
                    new SqlParameter("@Selling_Unit_Length",            SqlDbType.Int,        4),
                    new SqlParameter("@Selling_Unit_Width",             SqlDbType.Int,        4),
                    new SqlParameter("@Selling_Unit_Height",            SqlDbType.Int,        4),
                    new SqlParameter("@UOM_Selling_Size",               SqlDbType.Char,       3),
                    new SqlParameter("@Grossweight_Selling",            SqlDbType.Decimal,   13),
                    new SqlParameter("@Netweight_Selling",              SqlDbType.Decimal,   13),
                    new SqlParameter("@UOM_Selling_Weight",             SqlDbType.Char,       3),
                    new SqlParameter("@Article_Group_Number",           SqlDbType.Int,        4),
                    new SqlParameter("@Artice_Subgroup_Number",         SqlDbType.Int,        4),
                    new SqlParameter("@Excise_Tax_Indicator",           SqlDbType.Int,        4),
                    new SqlParameter("@Excise_Tax_Amount",              SqlDbType.Decimal,   13),
                    new SqlParameter("@High_Value_Indicator",           SqlDbType.Int,        4),
                    new SqlParameter("@Storage_Temperature_Desc",       SqlDbType.Char,      25),
                    new SqlParameter("@Remark",                         SqlDbType.NVarChar, 466),
                    new SqlParameter("@EditDate",                       SqlDbType.DateTime,   8),
                    new SqlParameter("@BLANK1",                         SqlDbType.Char,       4),
                    new SqlParameter("@BLANK2",                         SqlDbType.Char,       4),
                    new SqlParameter("@BLANK3",                         SqlDbType.Char,       4),
                    new SqlParameter("@BLANK4",                         SqlDbType.Char,       1),
                    new SqlParameter("@BLANK5",                         SqlDbType.Char,       1),
                    new SqlParameter("@BLANK6",                         SqlDbType.Char,       8),
                    new SqlParameter("@BLANK7",                         SqlDbType.Char,       8),
                    new SqlParameter("@FILENAME",                       SqlDbType.NVarChar, 200)
                };
                sp[0].Value = "Update";

                sp[1].Value = this.Serialkey;

                sp[2].Value = this.Table_Indicator;

                sp[3].Value = this.Action_Code;

                sp[4].Value = this.Lsp_Identification;

                sp[5].Value = this.Article_Number;

                sp[6].Value = this.Supplier_Code;

                sp[7].Value = this.Buying_Unit;

                sp[8].Value = this.Selling_Unit;

                sp[9].Value = this.Ordering_Unit;

                sp[10].Value = this.Article_Type;

                sp[11].Value = this.Article_Status;

                sp[12].Value = this.Buyer_User_Id;

                sp[13].Value = this.Desc_Article;

                sp[14].Value = this.Packing_type_Article;

                sp[15].Value = this.Article_Related;

                sp[16].Value = this.EAN_Code;

                sp[17].Value = this.Supplier_Article_Number;

                sp[18].Value = this.Article_Desc;

                sp[19].Value = this.Number_Mu_Carton;

                sp[20].Value = this.Number_Mu_Layer;

                sp[21].Value = this.Number_Mu_Pallet;

                sp[22].Value = this.Carton_Length;

                sp[23].Value = this.Carton_GrossWeight;

                sp[24].Value = this.Carton_NetWeight;

                sp[25].Value = this.Warehouse_Number;

                sp[26].Value = this.Date_Record;

                sp[27].Value = this.Logistic_Deposit_Type;

                sp[28].Value = this.Logistic_Flow_Indicator;

                sp[29].Value = this.Ordering_Indicator;

                sp[30].Value = this.Link_Logistic_Deposit;

                sp[31].Value = this.Expiry_Days;

                sp[32].Value = this.Expiry_Days_Checking_Indicator;

                sp[33].Value = this.Minimum_Expiry_Days;

                sp[34].Value = this.Pallet_Indicator;

                sp[35].Value = this.Number_Layer_Pallet;

                sp[36].Value = this.Number_Units_Inbox;

                sp[37].Value = this.Gross_Volume;

                sp[38].Value = this.Measure_Unit_GrossVolume;

                sp[39].Value = this.Packing_Type;

                sp[40].Value = this.Carton_Width;

                sp[41].Value = this.Carton_Height;

                sp[42].Value = this.UOM_Carton_Size;

                sp[43].Value = this.UOM_Carton_Weight;

                sp[44].Value = this.Carton_Gross_Volume;

                sp[45].Value = this.UOM_Carton_Volume;

                sp[46].Value = this.Selling_Unit_Length;

                sp[47].Value = this.Selling_Unit_Width;

                sp[48].Value = this.Selling_Unit_Height;

                sp[49].Value = this.UOM_Selling_Size;

                sp[50].Value = this.Grossweight_Selling;

                sp[51].Value = this.Netweight_Selling;

                sp[52].Value = this.UOM_Selling_Weight;

                sp[53].Value = this.Article_Group_Number;

                sp[54].Value = this.Artice_Subgroup_Number;

                sp[55].Value = this.Excise_Tax_Indicator;

                sp[56].Value = this.Excise_Tax_Amount;

                sp[57].Value = this.High_Value_Indicator;

                sp[58].Value = this.Storage_Temperature_Desc;

                sp[59].Value = this.Remark;

                sp[60].Value = this.EditDate;

                sp[61].Value = this.BLANK1;

                sp[62].Value = this.BLANK2;

                sp[63].Value = this.BLANK3;

                sp[64].Value = this.BLANK4;

                sp[65].Value = this.BLANK5;

                sp[66].Value = this.BLANK6;

                sp[67].Value = this.BLANK7;

                sp[68].Value = this.FILENAME;



                DAL.excutequery(PP_MM_Articles, sp, CommandType.StoredProcedure);
                return(true);
            }
            catch (Exception e)
            {
                string category             = "Article";
                ResultDatabase_Model result = new ResultDatabase_Model();
                result.HandleError(fileName, text, e.Message.ToString(), this.Article_Number, category);
                return(false);
            }
        }
Esempio n. 7
0
        public Boolean Update(string fileName, string text)
        {
            try
            {
                SqlParameter[] sp =
                {
                    new SqlParameter("@Action",                       SqlDbType.NVarChar, 255),
                    new SqlParameter("@Serialkey",                    SqlDbType.Int,        4),
                    new SqlParameter("@Table_Indicator",              SqlDbType.Int,        4),
                    new SqlParameter("@Action_Code",                  SqlDbType.Char,       1),
                    new SqlParameter("@Lsp_Identification",           SqlDbType.Char,       4),
                    new SqlParameter("@Supplier_Code",                SqlDbType.Char,       6),
                    new SqlParameter("@Supplier_Name",                SqlDbType.Char,      35),
                    new SqlParameter("@Supplier_Status",              SqlDbType.Int,        4),
                    new SqlParameter("@Supplier_Type",                SqlDbType.Int,        4),
                    new SqlParameter("@Buyer_User_Id",                SqlDbType.Char,       6),
                    new SqlParameter("@Supplier_Fiscal_Number",       SqlDbType.Char,      15),
                    new SqlParameter("@Way_Of_Order",                 SqlDbType.Int,        4),
                    new SqlParameter("@Language_Code",                SqlDbType.Char,       2),
                    new SqlParameter("@Currency_Code",                SqlDbType.Char,       3),
                    new SqlParameter("@Warehouse_Number",             SqlDbType.Char,       5),
                    new SqlParameter("@Date_Record",                  SqlDbType.Date,       3),
                    new SqlParameter("@Default_Logistic_Flow",        SqlDbType.Int,        4),
                    new SqlParameter("@Supplier_Registration_Number", SqlDbType.Char,      15),
                    new SqlParameter("@EditDate",                     SqlDbType.DateTime,   8),
                    new SqlParameter("@FILENAME",                     SqlDbType.NVarChar, 200),
                };
                sp[0].Value = "Update";

                sp[1].Value = this.Serialkey;

                sp[2].Value = this.Table_Indicator;

                sp[3].Value = this.Action_Code;

                sp[4].Value = this.Lsp_Identification;

                sp[5].Value = this.Supplier_Code;

                sp[6].Value = this.Supplier_Name;

                sp[7].Value = this.Supplier_Status;

                sp[8].Value = this.Supplier_Type;

                sp[9].Value = this.Buyer_User_Id;

                sp[10].Value = this.Supplier_Fiscal_Number;

                sp[11].Value = this.Way_Of_Order;

                sp[12].Value = this.Language_Code;

                sp[13].Value = this.Currency_Code;

                sp[14].Value = this.Warehouse_Number;

                sp[15].Value = this.Date_Record;

                sp[16].Value = this.Default_Logistic_Flow;

                sp[17].Value = this.Supplier_Registration_Number;

                sp[18].Value = this.EditDate;

                sp[19].Value = this.FILENAME;

                DAL.excutequery(PP_MM_Supplier_Header, sp, CommandType.StoredProcedure);
                return(true);
            }
            catch (Exception e)
            {
                string category             = "SUPPLIER_HEADER";
                ResultDatabase_Model result = new ResultDatabase_Model();
                result.HandleError(fileName, text, e.Message.ToString(), this.Supplier_Code, category);
                return(false);
            }
        }
        public Boolean Add(string fileName, string text)
        {
            try
            {
                SqlParameter[] sp =
                {
                    new SqlParameter("@Action",                SqlDbType.NVarChar, 255),
                    new SqlParameter("@Serialkey",             SqlDbType.Int,        4),
                    new SqlParameter("@Table_Indicator",       SqlDbType.Int,        4),
                    new SqlParameter("@Lsp_Identification",    SqlDbType.Char,       4),
                    new SqlParameter("@Order_Number",          SqlDbType.Char,      17),
                    new SqlParameter("@Article_Number",        SqlDbType.Char,       8),
                    new SqlParameter("@Store_Number",          SqlDbType.Char,       5),
                    new SqlParameter("@Order_Quantity",        SqlDbType.Decimal,    9),
                    new SqlParameter("@Warehouse_Number",      SqlDbType.Char,       6),
                    new SqlParameter("@Sale_Order",            SqlDbType.Char,      17),
                    new SqlParameter("@Metro_Mail",            SqlDbType.Char,       5),
                    new SqlParameter("@Buying_Article_Number", SqlDbType.Char,       7),
                    new SqlParameter("@ADDDATE",               SqlDbType.DateTime,   8),
                    new SqlParameter("@EDITDATE",              SqlDbType.DateTime,   8),
                    new SqlParameter("@BLANK1",                SqlDbType.Char,      38),
                    new SqlParameter("@BLANK2",                SqlDbType.Char,       8),
                    new SqlParameter("@FILENAME",              SqlDbType.NVarChar, 200),
                    new SqlParameter("@STATUS",                SqlDbType.NVarChar,  40),
                };
                sp[0].Value = "Addnew";

                sp[1].Value = this.Serialkey;

                sp[2].Value = this.Table_Indicator;

                sp[3].Value = this.Lsp_Identification;

                sp[4].Value = this.Order_Number;

                sp[5].Value = this.Article_Number;

                sp[6].Value = this.Store_Number;

                sp[7].Value = this.Order_Quantity;

                sp[8].Value = this.Warehouse_Number;

                sp[9].Value = this.Sale_Order;

                sp[10].Value = this.Metro_Mail;

                sp[11].Value = this.Buying_Article_Number;

                sp[12].Value = this.ADDDATE;

                sp[13].Value = this.EDITDATE;

                sp[14].Value = this.BLANK1;

                sp[15].Value = this.BLANK2;

                sp[16].Value = this.FILENAME;

                sp[17].Value = this.STATUS;

                DAL.excutequery(PP_MM_PO_Detail_XD, sp, CommandType.StoredProcedure);
                return(true);
            }
            catch (Exception e)
            {
                string category             = "PO_DETAIL_XDOCK";
                ResultDatabase_Model result = new ResultDatabase_Model();
                result.HandleError(fileName, text, e.Message.ToString(), this.Order_Number, category);
                return(false);
            }
        }