Exemplo n.º 1
0
            public string Insert()
            {
                DAL.DAL dal = new DAL.DAL();


                SqlParameter[] param = new SqlParameter[2];

                param[0]       = new SqlParameter("@Name", SqlDbType.NVarChar, 50);
                param[0].Value = Name;

                param[1]       = new SqlParameter("@Password", SqlDbType.NVarChar, 50);
                param[1].Value = Password;

                string F;

                F = dal.ExecuteCommand("Insert Into Users (Name,Password) Values (@Name , @Password)", param);

                return(F);
            }
Exemplo n.º 2
0
        public void Updateitem(string ID, string Name, int Min, int Catno)
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[4];
            param[0]       = new SqlParameter("@item_no", SqlDbType.NVarChar, 50);
            param[0].Value = ID;

            param[1]       = new SqlParameter("@item_name", SqlDbType.NVarChar, 50);
            param[1].Value = Name;

            param[2]       = new SqlParameter("@item_min", SqlDbType.Int);
            param[2].Value = Min;
            param[3]       = new SqlParameter("@categoryno", SqlDbType.Int);
            param[3].Value = Catno;

            DAL.ExecuteCommand("Update_item", param);
            DAL.Close();
        }
Exemplo n.º 3
0
        public void Updatestore(int ID, string Name, string loc)
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[3];
            param[0]       = new SqlParameter("@storeno", SqlDbType.Int);
            param[0].Value = ID;

            param[1]       = new SqlParameter("@storename", SqlDbType.NVarChar, 25);
            param[1].Value = Name;

            param[2]       = new SqlParameter("@storeloc", SqlDbType.NVarChar, 50);
            param[2].Value = loc;



            DAL.ExecuteCommand("Update_store", param);
            DAL.Close();
        }
Exemplo n.º 4
0
        public void Updatecategory(int ID, string Name, string abb)
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[3];
            param[0]       = new SqlParameter("@categoryno", SqlDbType.Int);
            param[0].Value = ID;

            param[1]       = new SqlParameter("@categoryname", SqlDbType.NVarChar, 50);
            param[1].Value = Name;


            param[2]       = new SqlParameter("@abbreviation", SqlDbType.NVarChar, 10);
            param[2].Value = abb;


            DAL.ExecuteCommand("Update_category", param);
            DAL.Close();
        }
Exemplo n.º 5
0
        public string Jor_Close()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[9];

            param[0]       = new SqlParameter("@Date", SqlDbType.DateTime);
            param[0].Value = Date;

            param[1]       = new SqlParameter("@Notes", SqlDbType.NVarChar, 50);
            param[1].Value = Notes;

            param[2]       = new SqlParameter("@Branche_ID", SqlDbType.VarChar, 3);
            param[2].Value = Branche_ID;

            param[3]       = new SqlParameter("@CC1_ID", SqlDbType.VarChar, 50);
            param[3].Value = CC1_ID;

            param[4]       = new SqlParameter("@CC2_ID", SqlDbType.VarChar, 50);
            param[4].Value = CC2_ID;

            param[5]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[5].Value = User_ID;

            param[6]       = new SqlParameter("@Currency", SqlDbType.Int);
            param[6].Value = Currency;

            param[7]       = new SqlParameter("@Currency_Rate", SqlDbType.Decimal);
            param[7].Value = Currency_Rate;

            param[8]       = new SqlParameter("@ALL_Branches", SqlDbType.Bit);
            param[8].Value = ALL_Branches;

            string F;

            F = DAL.ExecuteCommand("Jor_Close", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 6
0
        public void updatefinalReport(int ID, string report, string name, int status)
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[4];
            param[0]       = new SqlParameter("@id", SqlDbType.Int);
            param[0].Value = ID;


            param[1]       = new SqlParameter("@report", SqlDbType.NVarChar, 20);
            param[1].Value = report;
            param[2]       = new SqlParameter("@name", SqlDbType.NVarChar, 250);
            param[2].Value = name;

            param[3]       = new SqlParameter("@status", SqlDbType.Int);
            param[3].Value = status;

            DAL.ExecuteCommand("Update_finalreport", param);
            DAL.Close();
        }
Exemplo n.º 7
0
            public string Update()
            {
                DAL.DAL dal = new DAL.DAL();

                SqlParameter[] param = new SqlParameter[3];

                param[0]       = new SqlParameter("@ID", SqlDbType.Int);
                param[0].Value = ID;

                param[1]       = new SqlParameter("@Name", SqlDbType.NVarChar, 50);
                param[1].Value = Name;

                param[2]       = new SqlParameter("@Password", SqlDbType.NVarChar, 50);
                param[2].Value = Password;

                string F;

                F = dal.ExecuteCommand("Update Users Set Name = @Name , Password = @Password Where ID = @ID", param);
                return(F);
            }
Exemplo n.º 8
0
        public string Insert_Store()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[3];

            param[0]       = new SqlParameter("@Store_Name", SqlDbType.NVarChar, 50);
            param[0].Value = Store_Name;

            param[1]       = new SqlParameter("@Branche_ID", SqlDbType.VarChar, 3);
            param[1].Value = Branche_ID;

            param[2]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[2].Value = User_ID;

            return(DAL.ExecuteCommand("Stores_Insert", param));

            DAL.Close();
        }
Exemplo n.º 9
0
        public void AddsenderReport(int ID, int dept, DateTime date, string title, string details)
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[5];
            param[0]       = new SqlParameter("@ID", SqlDbType.Int);
            param[0].Value = ID;

            param[1]       = new SqlParameter("@deptid", SqlDbType.Int);
            param[1].Value = dept;

            param[2]       = new SqlParameter("@date", SqlDbType.DateTime);
            param[2].Value = date;
            param[3]       = new SqlParameter("@title", SqlDbType.NVarChar, 20);
            param[3].Value = title;
            param[4]       = new SqlParameter("@details", SqlDbType.NVarChar, 250);
            param[4].Value = details;

            DAL.ExecuteCommand("Add_sender_report", param);
            DAL.Close();
        }
Exemplo n.º 10
0
        public string Item_Units_Delete_Check()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[2];

            param[0]       = new SqlParameter("@Item_ID", SqlDbType.VarChar, 10);
            param[0].Value = Item_ID;

            param[1]       = new SqlParameter("@unit_id", SqlDbType.Int);
            param[1].Value = unit_id;

            string F;

            F = DAL.ExecuteCommand("Item_Units_Delete_Check", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 11
0
        public string Units_Insert()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[2];

            param[0]       = new SqlParameter("@anm", SqlDbType.NVarChar, 20);
            param[0].Value = unit_anm;

            param[1]       = new SqlParameter("@enm", SqlDbType.NVarChar, 20);
            param[1].Value = unit_enm;

            string F;

            F = DAL.ExecuteCommand("Units_Insert", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 12
0
        public string Descriptions_Names_Update()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[2];

            param[0]       = new SqlParameter("@id", SqlDbType.Int);
            param[0].Value = des_id;

            param[1]       = new SqlParameter("@name", SqlDbType.NVarChar, 15);
            param[1].Value = des_name;

            string F;

            F = DAL.ExecuteCommand("Descriptions_Names_Update", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 13
0
        public string Insert()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[8];

            param[0]       = new SqlParameter("@CC_Name", SqlDbType.NVarChar, 50);
            param[0].Value = CC_Name;

            param[1]       = new SqlParameter("@Parent_ID", SqlDbType.VarChar);
            param[1].Value = Parent_ID;

            param[2]       = new SqlParameter("@CC_Level", SqlDbType.Int);
            param[2].Value = CC_Level;

            param[3]       = new SqlParameter("@Branche", SqlDbType.VarChar, 3);
            param[3].Value = Branche;

            param[4]       = new SqlParameter("@CC1", SqlDbType.Bit);
            param[4].Value = CC1;

            param[5]       = new SqlParameter("@CC2", SqlDbType.Bit);
            param[5].Value = CC2;

            param[6]       = new SqlParameter("@Notes", SqlDbType.NVarChar);
            param[6].Value = Notes;

            param[7]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[7].Value = User_ID;

            string F;

            F = DAL.ExecuteCommand("CC_Insert", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 14
0
        public void Updateuser(int ID, string Name, string pw, int autho)
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[4];
            param[0]       = new SqlParameter("@UserID", SqlDbType.Int);
            param[0].Value = ID;

            param[1]       = new SqlParameter("@UserName", SqlDbType.NVarChar, 50);
            param[1].Value = Name;

            param[2]       = new SqlParameter("@UserPsw", SqlDbType.NVarChar, 10);
            param[2].Value = pw;

            param[3]       = new SqlParameter("@Autho_typno", SqlDbType.Int);
            param[3].Value = autho;



            DAL.ExecuteCommand("Update_users", param);
            DAL.Close();
        }
Exemplo n.º 15
0
        public void Updatemp(int ID, string Name, int position, int admin)
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[4];
            param[0]       = new SqlParameter("@EmpID", SqlDbType.Int);
            param[0].Value = ID;

            param[1]       = new SqlParameter("@EmpName", SqlDbType.NVarChar, 50);
            param[1].Value = Name;

            param[2]       = new SqlParameter("@EmppositionID", SqlDbType.Int);
            param[2].Value = position;

            param[3]       = new SqlParameter("@EmpadminID", SqlDbType.Int);
            param[3].Value = admin;



            DAL.ExecuteCommand("Update_Employee", param);
            DAL.Close();
        }
Exemplo n.º 16
0
        public string Update()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[8];

            param[0]       = new SqlParameter("@Ven_ID", SqlDbType.VarChar, 50);
            param[0].Value = ID;

            param[1]       = new SqlParameter("@Ven_Name", SqlDbType.NVarChar, 50);
            param[1].Value = Name;

            param[2]       = new SqlParameter("@Ven_Address", SqlDbType.NVarChar, 50);
            param[2].Value = Address;

            param[3]       = new SqlParameter("@Ven_Mobile", SqlDbType.VarChar, 20);
            param[3].Value = Mobile;

            param[4]       = new SqlParameter("@Ven_Phone", SqlDbType.VarChar, 20);
            param[4].Value = Phone;

            param[5]       = new SqlParameter("@Ven_Notes", SqlDbType.NVarChar, 50);
            param[5].Value = Notes;

            param[6]       = new SqlParameter("@Ven_ACC", SqlDbType.VarChar, 50);
            param[6].Value = Ven_ACC;

            param[7]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[7].Value = User_ID;

            string F;

            F = DAL.ExecuteCommand("Ven_Update", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 17
0
        public string Insert()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[8];

            param[0]       = new SqlParameter("@Rep_Name", SqlDbType.NVarChar, 50);
            param[0].Value = Name;

            param[1]       = new SqlParameter("@Content", SqlDbType.NVarChar, 500);
            param[1].Value = Content;

            param[2]       = new SqlParameter("@Row_Count", SqlDbType.Int);
            param[2].Value = Row_Count;

            param[3]       = new SqlParameter("@Row_Index", SqlDbType.Bit);
            param[3].Value = Row_Index;

            param[4]       = new SqlParameter("@Font_Size", SqlDbType.Int);
            param[4].Value = Font_Size;

            param[5]       = new SqlParameter("@Rep_View", SqlDbType.NVarChar, 15);
            param[5].Value = Rep_View;

            param[6]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[6].Value = User_ID;

            param[7]       = new SqlParameter("@Rep_D", SqlDbType.Structured);
            param[7].Value = Rep_D;

            string F;

            F = DAL.ExecuteCommand("Rep_Insert", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 18
0
        public void UpdateInvoiceDetails(int ID, int item,
                                         int Qty, string Cost, string Expdate, string Price, string Percentage, string total, int invoiceID)
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[9];
            param[0]       = new SqlParameter("@ID", SqlDbType.Int);
            param[0].Value = ID;

            param[1]       = new SqlParameter("@item", SqlDbType.Int);
            param[1].Value = item;

            param[2]       = new SqlParameter("@Qty", SqlDbType.Int);
            param[2].Value = Qty;

            param[3]       = new SqlParameter("@Cost", SqlDbType.NVarChar, 50);
            param[3].Value = Cost;

            param[4]       = new SqlParameter("@Expdate", SqlDbType.NVarChar, 50);
            param[4].Value = Expdate;

            param[5]       = new SqlParameter("@Price", SqlDbType.NVarChar, 50);
            param[5].Value = Price;

            param[6]       = new SqlParameter("@Percentage", SqlDbType.NVarChar, 50);
            param[6].Value = Percentage;

            param[7]       = new SqlParameter("@total", SqlDbType.NVarChar, 50);
            param[7].Value = total;

            param[8]       = new SqlParameter("@invoiceID", SqlDbType.Int);
            param[8].Value = invoiceID;


            DAL.ExecuteCommand("UpdateInvoiceDetails", param);
            DAL.Close();
        }
Exemplo n.º 19
0
        public string Description_Insert()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[3];

            param[0]       = new SqlParameter("@des_name", SqlDbType.NVarChar, 50);
            param[0].Value = des_item_name;

            param[1]       = new SqlParameter("@des_Notes", SqlDbType.NVarChar, 100);
            param[1].Value = des_item_notes;

            param[2]       = new SqlParameter("@des_type", SqlDbType.Int);
            param[2].Value = des_item_type;

            string F;

            F = DAL.ExecuteCommand("Items_Description_Insert", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 20
0
        public string Job_Type_Insert(
            string Job_Type_Name
            , int User_ID
            )
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[2];

            param[0]       = new SqlParameter("@Job_Type_Name", SqlDbType.NVarChar, 50);
            param[0].Value = Job_Type_Name;

            param[1]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[1].Value = User_ID;

            string F;

            F = DAL.ExecuteCommand("Sp_Job_Type_Insert", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 21
0
            public string Insert()
            {
                DAL.DAL DAL = new DAL.DAL();
                DAL.open();

                SqlParameter[] param = new SqlParameter[3];

                param[0]       = new SqlParameter("@Anm", SqlDbType.NVarChar, 20);
                param[0].Value = Anm;

                param[1]       = new SqlParameter("@Enm", SqlDbType.NVarChar, 20);
                param[1].Value = Enm;

                param[2]       = new SqlParameter("@Rate", SqlDbType.Decimal);
                param[2].Value = Rate;

                string F;

                F = DAL.ExecuteCommand("Currency_Insert", param);

                DAL.Close();

                return(F);
            }
Exemplo n.º 22
0
        public string Jor_B_Insert(
            string Branche
            , int Bill_Type
            , int B_Type
            , int User_ID
            , DataTable dt_Jor_B
            )
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[5];

            param[0]       = new SqlParameter("@Branche", SqlDbType.VarChar, 3);
            param[0].Value = Branche;

            param[1]       = new SqlParameter("@Bill_Type", SqlDbType.Int);
            param[1].Value = Bill_Type;

            param[2]       = new SqlParameter("@B_Type", SqlDbType.Int);
            param[2].Value = B_Type;

            param[3]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[3].Value = User_ID;

            param[4]       = new SqlParameter("@dt_Jor_B", SqlDbType.Structured);
            param[4].Value = dt_Jor_B;

            string F;

            F = DAL.ExecuteCommand("Sp_Jor_B_Insert", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 23
0
        public string Jor_D_Insert(
            int Branche_ID
            , int Store_ID
            , int CC1_ID
            , int CC2_ID
            , string Ven_ID
            , string Jor_D_B_Type
            , string Jor_D_Jor_D_No
            , DateTime Jor_D_Jor_D_Date
            , DateTime Jor_D_Date
            , string Jor_D_Notes
            , decimal Jor_D_Total
            , decimal Jor_D_Total_Dis_Rate
            , decimal Jor_D_Total_Dis_Value
            , decimal Jor_D_Net
            , decimal Jor_D_Total_SPrice
            , int User_ID
            , DataTable dt_Items
            )
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[17];

            param[0]       = new SqlParameter("@Branche_ID", SqlDbType.Int);
            param[0].Value = Branche_ID;

            param[1]       = new SqlParameter("@Store_ID", SqlDbType.Int);
            param[1].Value = Store_ID;

            param[2]       = new SqlParameter("@CC1_ID", SqlDbType.Int);
            param[2].Value = CC1_ID;

            param[3]       = new SqlParameter("@CC2_ID", SqlDbType.Int);
            param[3].Value = CC2_ID;

            param[4]       = new SqlParameter("@Ven_ID", SqlDbType.NVarChar, 50);
            param[4].Value = Ven_ID;

            param[5]       = new SqlParameter("@Jor_D_B_Type", SqlDbType.NVarChar, 50);
            param[5].Value = Jor_D_B_Type;

            param[6]       = new SqlParameter("@Jor_D_Jor_D_No", SqlDbType.NVarChar, 50);
            param[6].Value = Jor_D_Jor_D_No;

            param[7]       = new SqlParameter("@Jor_D_Jor_D_Date", SqlDbType.DateTime);
            param[7].Value = Jor_D_Jor_D_Date;

            param[8]       = new SqlParameter("@Jor_D_Date", SqlDbType.DateTime);
            param[8].Value = Jor_D_Date;

            param[9]       = new SqlParameter("@Jor_D_Notes", SqlDbType.NVarChar, 50);
            param[9].Value = Jor_D_Notes;

            param[10]       = new SqlParameter("@Jor_D_Total", SqlDbType.Decimal);
            param[10].Value = Jor_D_Total;

            param[11]       = new SqlParameter("@Jor_D_Total_Dis_Rate", SqlDbType.Decimal);
            param[11].Value = Jor_D_Total_Dis_Rate;

            param[12]       = new SqlParameter("@Jor_D_Total_Dis_Value", SqlDbType.Decimal);
            param[12].Value = Jor_D_Total_Dis_Value;

            param[13]       = new SqlParameter("@Jor_D_Net", SqlDbType.Decimal);
            param[13].Value = Jor_D_Net;

            param[14]       = new SqlParameter("@Jor_D_Total_SPrice", SqlDbType.Decimal);
            param[14].Value = Jor_D_Total_SPrice;

            param[15]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[15].Value = User_ID;

            param[16]       = new SqlParameter("@dt_Items", SqlDbType.Structured);
            param[16].Value = dt_Items;

            string F;

            F = DAL.ExecuteCommand("Sp_Jor_D_Insert", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 24
0
        public string Update()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[18];

            param[0]       = new SqlParameter("@SalRe_ID", SqlDbType.VarChar, 10);
            param[0].Value = Bill_ID;

            param[1]       = new SqlParameter("@Branche_ID", SqlDbType.VarChar, 3);
            param[1].Value = Branche_ID;

            param[2]       = new SqlParameter("@Store_ID", SqlDbType.Int);
            param[2].Value = Store_ID;

            param[3]       = new SqlParameter("@CC1_ID", SqlDbType.VarChar, 50);
            param[3].Value = CC1_ID;

            param[4]       = new SqlParameter("@CC2_ID", SqlDbType.VarChar, 50);
            param[4].Value = CC2_ID;

            param[5]       = new SqlParameter("@Cust_ID", SqlDbType.NVarChar, 50);
            param[5].Value = Cust_ID;

            param[6]       = new SqlParameter("@SalRe_B_Type", SqlDbType.Int);
            param[6].Value = B_Type;

            param[7]       = new SqlParameter("@SalRe_Date", SqlDbType.DateTime);
            param[7].Value = SalRe_Date;

            param[8]       = new SqlParameter("@Currency", SqlDbType.Int);
            param[8].Value = Currency;

            param[9]       = new SqlParameter("@Currency_Rate", SqlDbType.Decimal);
            param[9].Value = Currency_Rate;

            param[10]       = new SqlParameter("@SalRe_OSalRe", SqlDbType.VarChar, 50);
            param[10].Value = SalRe_OSalRe;

            param[11]       = new SqlParameter("@SalRe_Notes", SqlDbType.NVarChar, 50);
            param[11].Value = Notes;

            param[12]       = new SqlParameter("@SalRe_Total", SqlDbType.Decimal);
            param[12].Value = Total;

            param[13]       = new SqlParameter("@SalRe_Total_Dis_Rate", SqlDbType.Decimal);
            param[13].Value = Total_Dis_Rate;

            param[14]       = new SqlParameter("@SalRe_Total_Dis_Value", SqlDbType.Decimal);
            param[14].Value = Total_Dis_Value;

            param[15]       = new SqlParameter("@SalRe_Net", SqlDbType.Decimal);
            param[15].Value = Net;

            param[16]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[16].Value = User_ID;

            param[17]       = new SqlParameter("@dt_SalRe_IO", SqlDbType.Structured);
            param[17].Value = dt_IO;

            string F;

            F = DAL.ExecuteCommand("SalRe_Update", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 25
0
        public string Update()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[36];

            param[0]       = new SqlParameter("@Item_ID", SqlDbType.VarChar, 50);
            param[0].Value = Item_ID;

            param[1]       = new SqlParameter("@anm", SqlDbType.NVarChar, 50);
            param[1].Value = anm;

            param[2]       = new SqlParameter("@enm", SqlDbType.NVarChar, 50);
            param[2].Value = enm;

            param[3]       = new SqlParameter("@Max_Quan", SqlDbType.Decimal);
            param[3].Value = Max_Quan;

            param[4]       = new SqlParameter("@Min_Quan", SqlDbType.Decimal);
            param[4].Value = Min_Quan;

            param[5]       = new SqlParameter("@Alarm_Quan", SqlDbType.Decimal);
            param[5].Value = Alarm_Quan;



            param[6]       = new SqlParameter("@des1", SqlDbType.Int);
            param[6].Value = des1;

            param[7]       = new SqlParameter("@des2", SqlDbType.Int);
            param[7].Value = des2;

            param[8]       = new SqlParameter("@des3", SqlDbType.Int);
            param[8].Value = des3;

            param[9]       = new SqlParameter("@des4", SqlDbType.Int);
            param[9].Value = des4;

            param[10]       = new SqlParameter("@des5", SqlDbType.Int);
            param[10].Value = des5;

            param[11]       = new SqlParameter("@des6", SqlDbType.Int);
            param[11].Value = des6;

            param[12]       = new SqlParameter("@des7", SqlDbType.Int);
            param[12].Value = des7;

            param[13]       = new SqlParameter("@des8", SqlDbType.NVarChar, 20);
            param[13].Value = des8;

            param[14]       = new SqlParameter("@des9", SqlDbType.NVarChar, 20);
            param[14].Value = des9;

            param[15]       = new SqlParameter("@des10", SqlDbType.NVarChar, 20);
            param[15].Value = des10;

            param[16]       = new SqlParameter("@image", SqlDbType.VarBinary);
            param[16].Value = image;



            param[17]       = new SqlParameter("@is_commodity", SqlDbType.Bit);
            param[17].Value = is_commodity;

            param[18]       = new SqlParameter("@is_complex", SqlDbType.Bit);
            param[18].Value = is_complex;

            param[19]       = new SqlParameter("@SPrice_complex_Type", SqlDbType.Int);
            param[19].Value = SPrice_complex_Type;

            param[20]       = new SqlParameter("@SPrice_complex2_Val", SqlDbType.Decimal);
            param[20].Value = SPrice_complex2_Val;

            param[21]       = new SqlParameter("@SPrice_complex3_Val", SqlDbType.Decimal);
            param[21].Value = SPrice_complex3_Val;

            param[22]       = new SqlParameter("@bonus", SqlDbType.Decimal);
            param[22].Value = bonus;

            param[23]       = new SqlParameter("@bonus_range", SqlDbType.Decimal);
            param[23].Value = bonus_range;

            param[24]       = new SqlParameter("@Currency_ID", SqlDbType.Int);
            param[24].Value = Currency_ID;

            param[25]       = new SqlParameter("@sales_tax", SqlDbType.Int);
            param[25].Value = sales_tax;

            param[26]       = new SqlParameter("@is_searchable", SqlDbType.Bit);
            param[26].Value = is_searchable;

            param[27]       = new SqlParameter("@Parent_ID", SqlDbType.VarChar, 50);
            param[27].Value = Parent_ID;

            param[28]       = new SqlParameter("@Is_Parent", SqlDbType.Bit);
            param[28].Value = Is_Parent;

            param[29]       = new SqlParameter("@level", SqlDbType.Int);
            param[29].Value = level;

            param[30]       = new SqlParameter("@user_id", SqlDbType.Int);
            param[30].Value = user_id;

            param[31]       = new SqlParameter("@dt_Item_Unit", SqlDbType.Structured);
            param[31].Value = dt_Item_Unit;

            param[32]       = new SqlParameter("@dt_Item_Price", SqlDbType.Structured);
            param[32].Value = dt_Item_Price;

            param[33]       = new SqlParameter("@dt_Item_Barcode", SqlDbType.Structured);
            param[33].Value = dt_Item_Barcode;

            param[34]       = new SqlParameter("@dt_Item_Ven", SqlDbType.Structured);
            param[34].Value = dt_Item_Ven;

            param[35]       = new SqlParameter("@dt_Item_Alt", SqlDbType.Structured);
            param[35].Value = dt_Item_Alt;

            string F;

            F = DAL.ExecuteCommand("Items_Update", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 26
0
        public string Update_Level_Set()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[30];

            param[0]       = new SqlParameter("@n1", SqlDbType.Int);
            param[0].Value = n1;

            param[1]       = new SqlParameter("@n2", SqlDbType.Int);
            param[1].Value = n2;

            param[2]       = new SqlParameter("@n3", SqlDbType.Int);
            param[2].Value = n3;

            param[3]       = new SqlParameter("@n4", SqlDbType.Int);
            param[3].Value = n4;

            param[4]       = new SqlParameter("@n5", SqlDbType.Int);
            param[4].Value = n5;

            param[5]       = new SqlParameter("@n6", SqlDbType.Int);
            param[5].Value = n6;

            param[6]       = new SqlParameter("@n7", SqlDbType.Int);
            param[6].Value = n7;

            param[7]       = new SqlParameter("@n8", SqlDbType.Int);
            param[7].Value = n8;

            param[8]       = new SqlParameter("@n9", SqlDbType.Int);
            param[8].Value = n9;

            param[9]       = new SqlParameter("@n10", SqlDbType.Int);
            param[9].Value = n10;

            param[10]       = new SqlParameter("@cc1", SqlDbType.Int);
            param[10].Value = cc1;

            param[11]       = new SqlParameter("@cc2", SqlDbType.Int);
            param[11].Value = cc2;

            param[12]       = new SqlParameter("@cc3", SqlDbType.Int);
            param[12].Value = cc3;

            param[13]       = new SqlParameter("@cc4", SqlDbType.Int);
            param[13].Value = cc4;

            param[14]       = new SqlParameter("@cc5", SqlDbType.Int);
            param[14].Value = cc5;

            param[15]       = new SqlParameter("@cc6", SqlDbType.Int);
            param[15].Value = cc6;

            param[16]       = new SqlParameter("@cc7", SqlDbType.Int);
            param[16].Value = cc7;

            param[17]       = new SqlParameter("@cc8", SqlDbType.Int);
            param[17].Value = cc8;

            param[18]       = new SqlParameter("@cc9", SqlDbType.Int);
            param[18].Value = cc9;

            param[19]       = new SqlParameter("@cc10", SqlDbType.Int);
            param[19].Value = cc10;

            param[20]       = new SqlParameter("@i1", SqlDbType.Int);
            param[20].Value = i1;

            param[21]       = new SqlParameter("@i2", SqlDbType.Int);
            param[21].Value = i2;

            param[22]       = new SqlParameter("@i3", SqlDbType.Int);
            param[22].Value = i3;

            param[23]       = new SqlParameter("@i4", SqlDbType.Int);
            param[23].Value = i4;

            param[24]       = new SqlParameter("@i5", SqlDbType.Int);
            param[24].Value = i5;

            param[25]       = new SqlParameter("@i6", SqlDbType.Int);
            param[25].Value = i6;

            param[26]       = new SqlParameter("@i7", SqlDbType.Int);
            param[26].Value = i7;

            param[27]       = new SqlParameter("@i8", SqlDbType.Int);
            param[27].Value = i8;

            param[28]       = new SqlParameter("@i9", SqlDbType.Int);
            param[28].Value = i9;

            param[29]       = new SqlParameter("@i10", SqlDbType.Int);
            param[29].Value = i10;

            string F;

            F = DAL.ExecuteCommand("G_Level_Set_Update", param);

            DAL.Close();

            return(F);
        }
Exemplo n.º 27
0
        public string Insert()
        {
            DAL.DAL DAL = new DAL.DAL();
            DAL.open();

            SqlParameter[] param = new SqlParameter[19];

            param[0]       = new SqlParameter("@Branche_ID", SqlDbType.VarChar, 3);
            param[0].Value = Branche_ID;

            param[1]       = new SqlParameter("@Store_ID", SqlDbType.Int);
            param[1].Value = Store_ID;

            param[2]       = new SqlParameter("@CC1_ID", SqlDbType.VarChar, 50);
            param[2].Value = CC1_ID;

            param[3]       = new SqlParameter("@CC2_ID", SqlDbType.VarChar, 50);
            param[3].Value = CC2_ID;

            param[4]       = new SqlParameter("@Ven_ID", SqlDbType.NVarChar, 50);
            param[4].Value = Ven_ID;

            param[5]       = new SqlParameter("@Pur_B_Type", SqlDbType.Int);
            param[5].Value = Pur_B_Type;

            param[6]       = new SqlParameter("@Pur_Pur_No", SqlDbType.NVarChar, 50);
            param[6].Value = Pur_Pur_No;

            param[7]       = new SqlParameter("@Pur_Pur_Date", SqlDbType.DateTime);
            param[7].Value = Pur_Pur_Date;

            param[8]       = new SqlParameter("@Pur_Date", SqlDbType.DateTime);
            param[8].Value = Pur_Date;

            param[9]       = new SqlParameter("@Pur_Notes", SqlDbType.NVarChar, 50);
            param[9].Value = Pur_Notes;

            param[10]       = new SqlParameter("@Currency", SqlDbType.Int);
            param[10].Value = Currency;

            param[11]       = new SqlParameter("@Currency_Rate", SqlDbType.Decimal);
            param[11].Value = Currency_Rate;

            param[12]       = new SqlParameter("@Pur_Total", SqlDbType.Decimal);
            param[12].Value = Pur_Total;

            param[13]       = new SqlParameter("@Pur_Total_Dis_Rate", SqlDbType.Decimal);
            param[13].Value = Pur_Total_Dis_Rate;

            param[14]       = new SqlParameter("@Pur_Total_Dis_Value", SqlDbType.Decimal);
            param[14].Value = Pur_Total_Dis_Value;

            param[15]       = new SqlParameter("@Pur_Net", SqlDbType.Decimal);
            param[15].Value = Pur_Net;

            param[16]       = new SqlParameter("@Pur_Total_SPrice", SqlDbType.Decimal);
            param[16].Value = Pur_Total_SPrice;

            param[17]       = new SqlParameter("@User_ID", SqlDbType.Int);
            param[17].Value = User_ID;

            param[18]       = new SqlParameter("@dt_Items", SqlDbType.Structured);
            param[18].Value = dt_Items;

            string F;

            F = DAL.ExecuteCommand("Pur_Insert", param);

            DAL.Close();

            return(F);
        }