public void add_order(int customerID, string inv_no, string note, double total_ammount, double resived, string isCashed, DateTime DateT, string Type) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[8]; param[0] = new SqlParameter("@inv_no", SqlDbType.NVarChar, 50); param[0].Value = inv_no; param[1] = new SqlParameter("@inv_date", SqlDbType.DateTime); param[1].Value = DateT; param[2] = new SqlParameter("@note", SqlDbType.NVarChar, 50); param[2].Value = note; param[3] = new SqlParameter("@customer_iD", SqlDbType.Int); param[3].Value = customerID; param[4] = new SqlParameter("@total_amount", SqlDbType.Money); param[4].Value = total_ammount; param[5] = new SqlParameter("@recived", SqlDbType.Money); param[5].Value = resived; param[6] = new SqlParameter("@isCashed", SqlDbType.NVarChar, 50); param[6].Value = isCashed; param[7] = new SqlParameter("@type", SqlDbType.NVarChar, 50); param[7].Value = Type; DAL.Executecmd("add_order", param); DAL.close(); }
public void insertMtr(string nameMtr, Double buyPrice, Double salePrice, double quantity, string type, string storeid) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[7]; param[0] = new SqlParameter("@mat_name", SqlDbType.VarChar, 50); param[0].Value = nameMtr; param[1] = new SqlParameter("@mat_buy_price", SqlDbType.Money); param[1].Value = buyPrice; param[2] = new SqlParameter("@mat_sale_price", SqlDbType.Money); param[2].Value = salePrice; param[3] = new SqlParameter("@Quantity", SqlDbType.Decimal); param[3].Value = quantity; param[4] = new SqlParameter("@type_name", SqlDbType.NVarChar, 50); param[4].Value = type; param[5] = new SqlParameter("@dateT", SqlDbType.DateTime); param[5].Value = DateTime.Now; param[6] = new SqlParameter("@store_id", SqlDbType.NVarChar, 50); param[6].Value = storeid; DAL.Executecmd("insertMatirials", param); DAL.close(); }
//public void UpdateDebts(string CustomerId, string NewTotal, string NewReceived , string OldTotal,string OldRec) //{ // DAL.DataAccessLayer accessobject = new DAL.DataAccessLayer(); // SqlParameter[] param = new SqlParameter[3]; // param[0] = new SqlParameter("@customer_id", SqlDbType.NVarChar, 50); // param[0].Value = CustomerId; // param[1] = new SqlParameter("@new_total", SqlDbType.NVarChar, 50); // param[1].Value = NewTotal; // param[2] = new SqlParameter("@new_received", SqlDbType.NVarChar, 50); // param[2].Value = NewReceived; // param[3] = new SqlParameter("@old_total", SqlDbType.NVarChar, 50); // param[3].Value = OldTotal; // param[4] = new SqlParameter("@old_received", SqlDbType.NVarChar, 50); // param[4].Value =OldRec; // accessobject.Executecmd("delete_debts_on_update_invoice", param); // accessobject.close(); //} public void UpdateDebts(string CustomerId, string OrderID, string debt_value, Double MoneyOf, DateTime Dt) { DAL.DataAccessLayer accessobject = new DAL.DataAccessLayer(); SqlParameter[] param = new SqlParameter[5]; param[0] = new SqlParameter("@customer_id", SqlDbType.NVarChar, 50); param[0].Value = CustomerId; param[1] = new SqlParameter("@order_id", SqlDbType.NVarChar, 50); param[1].Value = OrderID; param[2] = new SqlParameter("@debt_value", SqlDbType.NVarChar, 50); param[2].Value = debt_value; param[3] = new SqlParameter("@moneyOf", SqlDbType.Money); param[3].Value = MoneyOf; param[4] = new SqlParameter("@dateT", SqlDbType.DateTime); param[4].Value = Dt; accessobject.open(); accessobject.Executecmd("delete_debts_on_update_invoice", param); accessobject.close(); }
public void add_order_detail(int mat_no, string matName, string order_no, double qte, double price, double amount) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[6]; param[0] = new SqlParameter("@mat_no", SqlDbType.Int); param[0].Value = mat_no; param[1] = new SqlParameter("@order_no", SqlDbType.NVarChar, 50); param[1].Value = order_no; param[2] = new SqlParameter("@qte", SqlDbType.Decimal); param[2].Value = qte; param[3] = new SqlParameter("@price", SqlDbType.Money); param[3].Value = price; param[4] = new SqlParameter("@amount", SqlDbType.Money); param[4].Value = amount; param[5] = new SqlParameter("@mat_name", SqlDbType.NVarChar, 50); param[5].Value = matName; DAL.Executecmd("add_order_detail", param); DAL.close(); }
public void update_doc_head(int customerID, string id, string note, double total_ammount, double paid, Double rest, int season_id, DateTime dateT) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[8]; param[0] = new SqlParameter("@id", SqlDbType.Int); param[0].Value = Convert.ToInt32(id); param[1] = new SqlParameter("@doc_date", SqlDbType.DateTime); param[1].Value = dateT; param[2] = new SqlParameter("@note", SqlDbType.NVarChar, 50); param[2].Value = note; param[3] = new SqlParameter("@customer_iD", SqlDbType.Int); param[3].Value = customerID; param[4] = new SqlParameter("@total_amount", SqlDbType.Money); param[4].Value = total_ammount; param[5] = new SqlParameter("@paid", SqlDbType.Money); param[5].Value = paid; param[6] = new SqlParameter("@rest", SqlDbType.Money); param[6].Value = rest; param[7] = new SqlParameter("@season_id", SqlDbType.Money); param[7].Value = season_id; DAL.Executecmd("add_doc", param); DAL.close(); }
public void add_order_detail(int mat_no, int order_no, int qte, double price, int amount) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[5]; param[0] = new SqlParameter("@mat_no", SqlDbType.Int); param[0].Value = mat_no; param[1] = new SqlParameter("@order_no", SqlDbType.Int); param[1].Value = order_no; param[2] = new SqlParameter("@qte", SqlDbType.Int); param[2].Value = qte; param[3] = new SqlParameter("@price", SqlDbType.Money); param[3].Value = price; param[4] = new SqlParameter("@amount", SqlDbType.Money); param[4].Value = Convert.ToDouble(amount); DAL.Executecmd("add_order_detail", param); DAL.close(); }
public void UpdaterMtr(string MatId, string nameMtr, Double buyPrice, Double salePrice, double quantity) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[5]; param[0] = new SqlParameter("@mat_name", SqlDbType.VarChar, 50); param[0].Value = nameMtr; param[1] = new SqlParameter("@mat_buy_price", SqlDbType.Money); param[1].Value = buyPrice; param[2] = new SqlParameter("@mat_sale_price", SqlDbType.Money); param[2].Value = salePrice; param[3] = new SqlParameter("@Quantity", SqlDbType.Decimal); param[3].Value = quantity; param[4] = new SqlParameter("@mat_id", SqlDbType.VarChar, 50); param[4].Value = MatId; DAL.Executecmd("updaterMtr", param); DAL.close(); }
public void update_doc_tail(int mat_no, string mat_name, int order_no, int qte, double price, double amount) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[6]; param[0] = new SqlParameter("@mat_no", SqlDbType.Int); param[0].Value = mat_no; param[1] = new SqlParameter("@doc_no", SqlDbType.Int); param[1].Value = order_no; param[2] = new SqlParameter("@qte", SqlDbType.Int); param[2].Value = qte; param[3] = new SqlParameter("@price", SqlDbType.Money); param[3].Value = price; param[4] = new SqlParameter("@amount", SqlDbType.Money); param[4].Value = Convert.ToDouble(amount); param[5] = new SqlParameter("@mat_name", SqlDbType.NVarChar, 50); param[5].Value = mat_name; DAL.Executecmd("add_doc_detail", param); DAL.close(); }
public void add_serve_detail(string ServeName, int order_no, int qte, double price, double amount) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[5]; param[0] = new SqlParameter("@serve_no", SqlDbType.Int); param[0].Value = order_no; param[1] = new SqlParameter("@qte", SqlDbType.Int); param[1].Value = qte; param[2] = new SqlParameter("@price", SqlDbType.Money); param[2].Value = price; param[3] = new SqlParameter("@amount", SqlDbType.Money); param[3].Value = amount; param[4] = new SqlParameter("@serve_name", SqlDbType.NVarChar, 50); param[4].Value = ServeName; DAL.Executecmd("add_serve_detail", param); DAL.close(); }
public void SetCash(int amount, string type, DateTime dat, string mnthid) { DAL.DataAccessLayer accessobject = new DAL.DataAccessLayer(); SqlParameter[] param = new SqlParameter[4]; param[0] = new SqlParameter("@amount", SqlDbType.Int); param[0].Value = amount; param[1] = new SqlParameter("@typ", SqlDbType.NVarChar, 50); param[1].Value = type; param[2] = new SqlParameter("@dat", SqlDbType.DateTime); param[2].Value = dat; param[3] = new SqlParameter("@mnthid", SqlDbType.Int); param[3].Value = Convert.ToInt32(mnthid); accessobject.open(); accessobject.Executecmd("set_cash_form_rep", param); accessobject.close(); }
public void deletCustomer(int cus_no) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@cus_no", SqlDbType.Int); param[0].Value = cus_no; DAL.Executecmd("deletCustomer", param); DAL.close(); }
public void deletMatirials(int noMtr) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@mat_no", SqlDbType.Int); param[0].Value = noMtr; DAL.Executecmd("deletMatirials", param); DAL.close(); }
public void DeleteOrder(string Odrer_id) { DAL.DataAccessLayer accessobject = new DAL.DataAccessLayer(); accessobject.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@order_id", SqlDbType.NVarChar, 50); param[0].Value = Odrer_id; accessobject.Executecmd("delete_order", param); accessobject.close(); }
public void insCompanies(string compName) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@comp_name", SqlDbType.VarChar, 50); param[0].Value = compName; DAL.Executecmd("insCompanies", param); DAL.close(); }
public void delCat(string name) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@ref", SqlDbType.NVarChar, 50); param[0].Value = name; DAL.Executecmd("deleteCat", param); DAL.close(); }
public void InsertStore(string name) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@name", SqlDbType.NVarChar, 50); param[0].Value = name; DAL.Executecmd("insertStores", param); DAL.close(); }
public void DeleteUsr(string id) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@id", SqlDbType.NVarChar, 50); param[0].Value = id; DAL.Executecmd("delete_user", param); DAL.close(); }
public void InsDefRole(string RoleID, string UserType) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@role_name", SqlDbType.NVarChar, 50); param[0].Value = UserType; param[1] = new SqlParameter("@role_id", SqlDbType.NVarChar, 50); param[1].Value = RoleID; DAL.Executecmd("insert_dafault_role", param); DAL.close(); }
public void setOrderDepts(int customerID, int dept) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@customer_id", SqlDbType.Int); param[0].Value = customerID; param[1] = new SqlParameter("@depts", SqlDbType.Int); param[1].Value = dept; DAL.Executecmd("setOrderDepts", param); DAL.close(); }
public void updateCompaniesInfo(string compName, int id) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@comp_name", SqlDbType.VarChar, 50); param[0].Value = compName; param[1] = new SqlParameter("@id", SqlDbType.Int); param[1].Value = id; DAL.Executecmd("updateCompaniesInfo", param); DAL.close(); }
public void insertCat(string catName, string Storeid) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@cat_name", SqlDbType.VarChar, 50); param[0].Value = catName; param[1] = new SqlParameter("@store_id", SqlDbType.VarChar, 50); param[1].Value = Storeid; DAL.Executecmd("insertCats", param); DAL.close(); }
public void UpdateStoreName(string id, string NewName) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@id", SqlDbType.NVarChar, 50); param[0].Value = id; param[1] = new SqlParameter("@new_name", SqlDbType.NVarChar, 50); param[1].Value = NewName; DAL.Executecmd("update_store_name", param); DAL.close(); }
public void InsertPer(string FormName, string ItemName) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@form_name", SqlDbType.NVarChar, 50); param[0].Value = FormName; param[1] = new SqlParameter("@item_name", SqlDbType.NVarChar, 50); param[1].Value = FormName; DAL.Executecmd("insert_permissions", param); DAL.close(); }
public void set_Seasonal_disbursements(int season_id, double moneyOf) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@s_id", SqlDbType.Int); param[0].Value = season_id; param[1] = new SqlParameter("@mon", SqlDbType.Money); param[1].Value = moneyOf; DAL.Executecmd("set_Seasonal_disbursements", param); DAL.close(); }
/* * public DataTable debtRepayment(int customerID) * { * DAL.DataAccessLayer accessobject = new DAL.DataAccessLayer(); * SqlParameter[] param = new SqlParameter[1]; * * param[0] = new SqlParameter("@customerID", SqlDbType.Int); * param[0].Value = customerID; * * accessobject.open(); * * * DataTable Dt = new DataTable(); * Dt = accessobject.selectData("debtRepayment", param); * accessobject.close(); * * return Dt; * * } * * public void updateDeptInOrderTable(int invID, int dept,string isCashed) * { * DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); * DAL.open(); * SqlParameter[] param = new SqlParameter[3]; * * param[0] = new SqlParameter("@invID", SqlDbType.Int); * param[0].Value = invID; * * param[1] = new SqlParameter("@orderDept", SqlDbType.Int); * param[1].Value = dept; * * param[2] = new SqlParameter("@isCashed", SqlDbType.NVarChar,32); * param[2].Value = isCashed; * * * * DAL.Executecmd("REP", param); * DAL.close(); * } */ public void updateDeptInDeptTable(int invID, int dept) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@customerID", SqlDbType.Int); param[0].Value = invID; param[1] = new SqlParameter("@dept", SqlDbType.Int); param[1].Value = dept; DAL.Executecmd("updateDeptInDeptTable", param); DAL.close(); }
public void add_comp_order(string compName, double amount) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@comp_name", SqlDbType.NVarChar, 50); param[0].Value = compName; param[1] = new SqlParameter("@amount", SqlDbType.Money); param[1].Value = amount; DAL.Executecmd("add_comp_order", param); DAL.close(); }
public void UpdateCatName(string catName, int id, string OldName) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@new_name", SqlDbType.VarChar, 50); param[0].Value = catName; param[1] = new SqlParameter("@id", SqlDbType.Int); param[1].Value = id; param[2] = new SqlParameter("@old_name", SqlDbType.NVarChar, 50); param[2].Value = OldName; DAL.Executecmd("update_cat_name", param); DAL.close(); }
public void insExpenses(string name, double salary, DateTime dateT) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@name", SqlDbType.NVarChar, 50); param[0].Value = name; param[1] = new SqlParameter("@amount", SqlDbType.Money); param[1].Value = salary; param[2] = new SqlParameter("@dateT", SqlDbType.DateTime); param[2].Value = dateT; //DateTime.Now; DAL.open(); DAL.Executecmd("insExpenses", param); DAL.close(); }
public void insSeasons(string SeasonName, DateTime Start_Date, DateTime Expiry_date) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@season_name", SqlDbType.VarChar, 50); param[0].Value = SeasonName; param[1] = new SqlParameter("@Start_Date", SqlDbType.DateTime); param[1].Value = Start_Date; param[2] = new SqlParameter("@Expiry_date", SqlDbType.DateTime); param[2].Value = Expiry_date; DAL.Executecmd("insSeasons", param); DAL.close(); }
public void setDirCompaniesRep(string comp_name, double moneyOf) { DAL.DataAccessLayer DAL = new DAL.DataAccessLayer(); DAL.open(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@comp_name", SqlDbType.NVarChar, 50); param[0].Value = comp_name; param[1] = new SqlParameter("@moneyOf", SqlDbType.Money); param[1].Value = moneyOf; param[2] = new SqlParameter("@dateT", SqlDbType.DateTime); param[2].Value = DateTime.Now; DAL.Executecmd("setDirCompaniesRep", param); DAL.close(); }