public bool updatePubEmp(string code, string name) { StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE PUB_EMP SET "); strSql.Append("NAME = :name"); strSql.Append(" WHERE CODE = :code"); OleDbParameter[] parameters = { new OleDbParameter(":name", OleDbType.VarChar, 10), new OleDbParameter(":code", OleDbType.VarChar, 5) }; parameters[0].Value = name; parameters[1].Value = code; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool deleteMatClass(string code) { StringBuilder strSql = new StringBuilder(); strSql.Append("DELETE FROM MMIS_MAT_CLASS"); strSql.Append(" WHERE CODE = :code"); OleDbParameter[] parameters = { new OleDbParameter(":code", OleDbType.VarChar, 10) }; parameters[0].Value = code; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); StringBuilder strSql1 = new StringBuilder(); strSql1.Append("DELETE FROM MMIS_ACC_MAT_CLASS"); strSql1.Append(" WHERE CLASS_ID = :code"); OleDbParameter[] parameters1 = { new OleDbParameter(":code", OleDbType.VarChar, 10) }; parameters1[0].Value = code; int rows1 = SqlDBHelper.ExecuteSql(strSql1.ToString(), parameters1); if (rows > 0 && rows1 > 0) { return(true); } else { return(false); } }
public bool insertAccEmp(string Acc_id, string Emp_id, string role, string department) { int? acc_id = Convert.ToInt32(Acc_id); int? emp_id = Convert.ToInt32(Emp_id); StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO MMIS_ACC_EMP("); strSql.Append("ACC_ID,EMP_ID,ROLE,DEPARTMENT)"); strSql.Append(" values ("); strSql.Append(":acc_id,:emp_id,:role,:department)"); OleDbParameter[] parameters = { new OleDbParameter(":acc_id", OleDbType.Numeric, 5), new OleDbParameter(":emp_id", OleDbType.Numeric, 5), new OleDbParameter(":role", OleDbType.VarChar, 5), new OleDbParameter(":department", OleDbType.VarChar, 10) }; parameters[0].Value = acc_id; parameters[1].Value = emp_id; parameters[2].Value = role; parameters[3].Value = department; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool deleteBinTempDetail(decimal id, decimal seq) { StringBuilder strSql = new StringBuilder(); strSql.Append("DELETE FROM MMIS_BIN_TEMP_DETAIL"); strSql.Append(" WHERE ID = :id"); strSql.Append(" AND SEQ = :seq"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 13), new OleDbParameter(":seq", OleDbType.Numeric, 5) }; parameters[0].Value = id; parameters[1].Value = seq; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertPubEmp(string code, string name) { int? id = Convert.ToInt32(code); StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO PUB_EMP("); strSql.Append("ID,CODE,NAME,PASSWORD,POWER)"); strSql.Append(" values ("); strSql.Append(":id,:code,:name,'1','1')"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 5), new OleDbParameter(":code", OleDbType.VarChar, 5), new OleDbParameter(":name", OleDbType.VarChar, 10) }; parameters[0].Value = id; parameters[1].Value = code; parameters[2].Value = name; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertStorageEmp(string sto_id, string emp_id) { StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO MMIS_STORAGE_EMP("); strSql.Append(" STO_ID,EMP_ID)"); strSql.Append(" values ("); strSql.Append(":sto_id,:emp_id)"); OleDbParameter[] parameters = { new OleDbParameter(":sto_id", OleDbType.VarChar, 10), new OleDbParameter(":emp_id", OleDbType.VarChar, 10) }; parameters[0].Value = sto_id; parameters[1].Value = emp_id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertRelation(string sto_id, string to_id, string acc_id) { StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO MMIS_STORAGE_RELATION("); strSql.Append(" STO_ID,TO_ID,ACC_ID)"); strSql.Append(" values ("); strSql.Append(":sto_id,:to_id,:acc_id)"); OleDbParameter[] parameters = { new OleDbParameter(":sto_id", OleDbType.VarChar, 10), new OleDbParameter(":to_id", OleDbType.VarChar, 10), new OleDbParameter(":acc_id", OleDbType.VarChar, 10) }; parameters[0].Value = sto_id; parameters[1].Value = to_id; parameters[2].Value = acc_id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool updateBinDetail(decimal ID, decimal SEQ, string INVOICENO, decimal NUMS, decimal BUYING_PRICE) { StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE MMIS_BIN_TEMP_DETAIL SET "); strSql.Append("INVOICENO = :invoiceno,"); strSql.Append("NUMS = :nums,"); strSql.Append("BUYING_PRICE = :buying_price"); strSql.Append(" WHERE ID = :id"); strSql.Append(" AND SEQ = :seq"); OleDbParameter[] parameters = { new OleDbParameter(":invoiceno", OleDbType.VarChar, 16), new OleDbParameter(":nums", OleDbType.Numeric, 5), new OleDbParameter(":buying_price", OleDbType.Numeric, 12), new OleDbParameter(":id", OleDbType.Numeric, 13), new OleDbParameter(":seq", OleDbType.Numeric, 5) }; parameters[0].Value = INVOICENO; parameters[1].Value = NUMS; parameters[2].Value = BUYING_PRICE; parameters[3].Value = ID; parameters[4].Value = SEQ; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool deleteStorageEmp(string sto_id, string emp_id) { StringBuilder strSql = new StringBuilder(); strSql.Append("DELETE FROM MMIS_STORAGE_EMP"); strSql.Append(" WHERE STO_ID = :sto_id"); strSql.Append(" AND EMP_ID = :emp_id"); OleDbParameter[] parameters = { new OleDbParameter(":sto_id", OleDbType.VarChar, 10), new OleDbParameter(":emp_id", OleDbType.VarChar, 10) }; parameters[0].Value = sto_id; parameters[1].Value = emp_id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool updateStock(decimal NUMS, decimal Sto_ID, decimal Acc_ID, decimal Mat_ID, decimal Mat_Seq) { StringBuilder strSql1 = new StringBuilder(); strSql1.Append("UPDATE MMIS_STOCK SET "); strSql1.Append("CUR_NUM = CUR_NUM - :nums"); strSql1.Append(" WHERE STO_ID = :sto_id"); strSql1.Append(" AND ACC_ID = :acc_id"); strSql1.Append(" AND MAT_ID = :mat_id"); strSql1.Append(" AND MAT_SEQ = :mat_seq"); OleDbParameter[] parameters1 = { new OleDbParameter(":nums", OleDbType.Numeric, 5), new OleDbParameter(":sto_id", OleDbType.Numeric, 5), new OleDbParameter(":acc_id", OleDbType.Numeric, 3), new OleDbParameter(":mat_id", OleDbType.Numeric, 8), new OleDbParameter(":mat_seq", OleDbType.Numeric, 5) }; parameters1[0].Value = NUMS; parameters1[1].Value = Sto_ID; parameters1[2].Value = Acc_ID; parameters1[3].Value = Mat_ID; parameters1[4].Value = Mat_Seq; int rows1 = SqlDBHelper.ExecuteSql(strSql1.ToString(), parameters1); if (rows1 > 0) { return(true); } else { return(false); } }
public bool updateBoutTempMain(decimal bOutDetailID, decimal checkEmp, char acc_bill_state) { StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE MMIS_BOUT_TEMP_MAIN SET "); strSql.Append("ACC_BILL_STATE = :acc_bill_state,"); strSql.Append("CHECK_EMP = :checkEmp,"); strSql.Append("CHECK_TIME = SYSDATE"); strSql.Append(" WHERE ID = :id"); OleDbParameter[] parameters = { new OleDbParameter(":acc_bill_state", OleDbType.Char, 5), new OleDbParameter(":checkEmp", OleDbType.Numeric, 12), new OleDbParameter(":id", OleDbType.Numeric, 16) }; parameters[0].Value = acc_bill_state; parameters[1].Value = checkEmp; parameters[2].Value = bOutDetailID; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool updateBappMain(decimal id, decimal app_num) { StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE MMIS_BAPP_DETAIL SET"); strSql.Append(" APP_NUM = :app_num"); strSql.Append(" WHERE ID = :ID"); OleDbParameter[] parameters = { new OleDbParameter(":app_num", OleDbType.Numeric, 3), new OleDbParameter(":ID", OleDbType.Numeric, 13) }; parameters[0].Value = app_num; parameters[1].Value = id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool updateAccEmp(string Acc_id, string Emp_id, string role, string department) { int? acc_id = Convert.ToInt32(Acc_id); int? emp_id = Convert.ToInt32(Emp_id); StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE MMIS_ACC_EMP SET "); strSql.Append("ROLE = :role,"); strSql.Append("DEPARTMENT = :department"); strSql.Append(" WHERE ACC_ID = :acc_id"); strSql.Append(" AND EMP_ID = :emp_id"); OleDbParameter[] parameters = { new OleDbParameter(":role", OleDbType.VarChar, 10), new OleDbParameter(":department", OleDbType.VarChar, 5), new OleDbParameter(":acc_id", OleDbType.Numeric, 5), new OleDbParameter(":emp_id", OleDbType.Numeric, 5) }; parameters[0].Value = role; parameters[1].Value = department; parameters[2].Value = acc_id; parameters[3].Value = emp_id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool deleteRelation(string sto_id, string to_id, string acc_id) { StringBuilder strSql = new StringBuilder(); strSql.Append("DELETE FROM MMIS_STORAGE_RELATION"); strSql.Append(" WHERE STO_ID = :sto_id"); strSql.Append(" AND TO_ID = :to_id"); strSql.Append(" AND ACC_ID = :acc_id"); OleDbParameter[] parameters = { new OleDbParameter(":sto_id", OleDbType.VarChar, 10), new OleDbParameter(":to_id", OleDbType.VarChar, 10), new OleDbParameter(":acc_id", OleDbType.VarChar, 10) }; parameters[0].Value = sto_id; parameters[1].Value = to_id; parameters[2].Value = acc_id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
//审核 public bool examineState(decimal id, string state) { StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE MMIS_BIN_TEMP_MAIN SET"); strSql.Append(" STATE = :state"); strSql.Append(" WHERE ID = :id"); OleDbParameter[] parameters = { new OleDbParameter(":state", OleDbType.Numeric, 13), new OleDbParameter(":id", OleDbType.Numeric, 13) }; parameters[0].Value = state; parameters[1].Value = id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool deleteAccEmp(string Acc_id, string Emp_id) { int? acc_id = Convert.ToInt32(Acc_id); int? emp_id = Convert.ToInt32(Emp_id); StringBuilder strSql = new StringBuilder(); strSql.Append("DELETE FROM MMIS_ACC_EMP"); strSql.Append(" WHERE ACC_ID = :acc_id"); strSql.Append(" AND EMP_ID = :emp_id"); OleDbParameter[] parameters = { new OleDbParameter(":acc_id", OleDbType.Numeric, 10), new OleDbParameter(":emp_id", OleDbType.Numeric, 10) }; parameters[0].Value = acc_id; parameters[1].Value = emp_id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
//临时单修改明细 public bool updateBpriceTempDetail(decimal ID, decimal?SEQ, decimal NUMS, decimal RETAIL_PRICE_N, string REMARK) { StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE MMIS_BPRICE_TEMP_DETAIL SET "); strSql.Append("NUMS = :nums,"); strSql.Append("RETAIL_PRICE_N = :retail_price_n"); strSql.Append(" WHERE ID = :id"); strSql.Append(" AND SEQ = :seq"); OleDbParameter[] parameters = { new OleDbParameter(":nums", OleDbType.Numeric, 12), new OleDbParameter(":retail_price_n", OleDbType.Numeric, 16), new OleDbParameter(":id", OleDbType.Numeric, 13), new OleDbParameter(":seq", OleDbType.Numeric, 5) }; parameters[0].Value = NUMS; parameters[1].Value = RETAIL_PRICE_N; parameters[2].Value = ID; parameters[3].Value = SEQ; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool updateBappMain(decimal bAppID, decimal seq, decimal send_num, string remark) { StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE MMIS_BAPP_DETAIL SET"); strSql.Append(" SEND_NUM = :send_num,"); strSql.Append(" REMARK = :remark"); strSql.Append(" WHERE ID = :ID"); strSql.Append(" AND SEQ = :seq"); OleDbParameter[] parameters = { new OleDbParameter(":send_num", OleDbType.Numeric, 13), new OleDbParameter(":remark", OleDbType.VarChar, 128), new OleDbParameter(":ID", OleDbType.Numeric, 13), new OleDbParameter(":seq", OleDbType.Numeric, 5) }; parameters[0].Value = send_num; parameters[1].Value = remark; parameters[2].Value = bAppID; parameters[3].Value = seq; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool UpdateSysObject(string code, string isUser, string edition, string name, string Object, string version, string date, string seq, string remake) { DateTime Datetime = Convert.ToDateTime(date); // string sql = @"UPDATE SYS_OBJECT // SET IS_FUNCTION_POINT = '" + isUser + "' , IS_INFORMATION = '" + edition + "',NAME = '" + name + "',OBJECT = '" + Object + "',PARENTID1 = '" + version + "',INPUT_TIME = '" + Date + "',SEQ = '" + seq + "',REMAKE = '" + remake + "' WHERE CODE = '" + code + "'"; // int rows = SqlDBHelper.ExecuteSql(sql); // if (rows > 0) // { // return true; // } // else // { // return false; // } StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE SYS_OBJECT SET "); strSql.Append("IS_FUNCTION_POINT=:edition,"); strSql.Append("IS_INFORMATION=:isUser,"); strSql.Append("NAME=:name,"); strSql.Append("OBJECT=:Object,"); strSql.Append("PARENTID1=:version,"); strSql.Append("INPUT_TIME=:Datetime,"); strSql.Append("SEQ=:seq,"); strSql.Append("REMAKE=:remake"); strSql.Append(" where CODE=:code"); OleDbParameter[] parameters = { new OleDbParameter(":edition", OleDbType.VarChar, 50), new OleDbParameter(":isUser", OleDbType.VarChar, 50), new OleDbParameter(":name", OleDbType.VarChar, 50), new OleDbParameter(":Object", OleDbType.VarChar, 50), new OleDbParameter(":version", OleDbType.VarChar, 50), new OleDbParameter(":Datetime", OleDbType.Date), new OleDbParameter(":seq", OleDbType.VarChar, 50), new OleDbParameter(":remake", OleDbType.VarChar, 50), new OleDbParameter(":code", OleDbType.VarChar, 50) }; parameters[0].Value = edition; parameters[1].Value = isUser; parameters[2].Value = name; parameters[3].Value = Object; parameters[4].Value = version; parameters[5].Value = Datetime; parameters[6].Value = seq; parameters[7].Value = remake; parameters[8].Value = code; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertMatClass(string code, string name, string pid, string inputcode1, string inputcode2, string state, string remark, string manage_type, string acc_id) { StringBuilder strSql = new StringBuilder(); int id = Convert.ToInt32(code); int Acc_id = Convert.ToInt32(acc_id); int Pid = Convert.ToInt32(pid); char State = Convert.ToChar(state); strSql.Append("INSERT INTO MMIS_MAT_CLASS("); strSql.Append("ID,CODE,NAME,PID,INPUTCODE1,INPUTCODE2,STATE,REMARK,MANAGE_TYPE)"); strSql.Append(" values ("); strSql.Append(":id,:code,:name,:pid,:inputcode1,:inputcode2,:state,:remark,:manage_type)"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 3), new OleDbParameter(":code", OleDbType.VarChar, 8), new OleDbParameter(":name", OleDbType.VarChar, 32), new OleDbParameter(":pid", OleDbType.Numeric, 3), new OleDbParameter(":inputcode1", OleDbType.VarChar, 8), new OleDbParameter(":inputcode2", OleDbType.VarChar, 8), new OleDbParameter(":state", OleDbType.Char, 1), new OleDbParameter(":remark", OleDbType.VarChar, 128), new OleDbParameter(":manage_type", OleDbType.VarChar, 128) }; parameters[0].Value = id; parameters[1].Value = code; parameters[2].Value = name; parameters[3].Value = Pid; parameters[4].Value = inputcode1; parameters[5].Value = inputcode2; parameters[6].Value = State; parameters[7].Value = remark; parameters[8].Value = manage_type; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); StringBuilder strSql1 = new StringBuilder(); strSql1.Append("INSERT INTO MMIS_ACC_MAT_CLASS("); strSql1.Append("ACC_ID,CLASS_ID)"); strSql1.Append(" values ("); strSql1.Append(":Acc_id,:id)"); OleDbParameter[] parameters1 = { new OleDbParameter(":Acc_id", OleDbType.Numeric, 3), new OleDbParameter(":id", OleDbType.Numeric, 3) }; parameters1[0].Value = Acc_id; parameters1[1].Value = id; int rows1 = SqlDBHelper.ExecuteSql(strSql1.ToString(), parameters1); if (rows > 0 && rows1 > 0) { return(true); } else { return(false); } }
public bool updateAccount(string code, string name, string Price_rule, string Manage_type, string Use_stock, string inputcode1, string inputcode2, string State, string remark, string acc_emp_id, string danju) { StringBuilder strSql = new StringBuilder(); int? id = Convert.ToInt32(code); int? price_rule = Convert.ToInt32(Price_rule); char manage_type = Convert.ToChar(Manage_type); char use_stock = Convert.ToChar(Use_stock); char state = Convert.ToChar(State); strSql.Append("UPDATE MMIS_ACCOUNT_TYPE SET "); strSql.Append("NAME = :name,"); strSql.Append("PRICE_RULE = :price_rule,"); strSql.Append("MANAGE_TYPE = :manage_type,"); strSql.Append("USE_STOCK = :use_stock,"); strSql.Append("INPUTCODE1 = :inputcode1,"); strSql.Append("INPUTCODE2 = :inputcode2,"); strSql.Append("STATE = :state,"); strSql.Append("REMARK = :remark,"); strSql.Append("ACC_EMP_ID = :acc_emp_id,"); strSql.Append("DANJU = :danju"); strSql.Append(" WHERE CODE = :code"); OleDbParameter[] parameters = { new OleDbParameter(":name", OleDbType.VarChar, 32), new OleDbParameter(":price_rule", OleDbType.Numeric, 2), new OleDbParameter(":manage_type", OleDbType.Char, 1), new OleDbParameter(":use_stock", OleDbType.Char, 1), new OleDbParameter(":inputcode1", OleDbType.VarChar, 8), new OleDbParameter(":inputcode2", OleDbType.VarChar, 8), new OleDbParameter(":state", OleDbType.Char, 1), new OleDbParameter(":remark", OleDbType.VarChar, 128), new OleDbParameter(":acc_emp_id", OleDbType.VarChar, 16), new OleDbParameter(":danju", OleDbType.VarChar, 10), new OleDbParameter(":code", OleDbType.VarChar, 5), }; parameters[0].Value = name; parameters[1].Value = price_rule; parameters[2].Value = manage_type; parameters[3].Value = use_stock; parameters[4].Value = inputcode1; parameters[5].Value = inputcode2; parameters[6].Value = state; parameters[7].Value = remark; parameters[8].Value = acc_emp_id; parameters[9].Value = danju; parameters[10].Value = code; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool updateCatalog(string code, string name, string Account, string Type, string Price_rule, string App_mode, string inputcode1, string inputcode2, string State, string Cansell) { StringBuilder strSql = new StringBuilder(); int id = Convert.ToInt32(code) - 100000; int account = Convert.ToInt32(Account); int type = Convert.ToInt32(Type); int price_rule = Convert.ToInt32(Price_rule); char app_mode = Convert.ToChar(App_mode); char state = Convert.ToChar(State); char cansell = Convert.ToChar(Cansell); strSql.Append("UPDATE MMIS_CATALOG SET "); strSql.Append("NAME = :name,"); strSql.Append("ACCOUNT = :account,"); strSql.Append("TYPE = :type,"); strSql.Append("PRICE_RULE = :price_rule,"); strSql.Append("APP_MODE = :app_mode,"); strSql.Append("INPUTCODE1 = :inputcode1,"); strSql.Append("INPUTCODE2 = :inputcode2,"); strSql.Append("STATE = :state,"); strSql.Append("CANSELL = :cansell"); strSql.Append(" WHERE CODE = :id"); OleDbParameter[] parameters = { new OleDbParameter(":name", OleDbType.VarChar, 64), new OleDbParameter(":account", OleDbType.Numeric, 5), new OleDbParameter(":type", OleDbType.Numeric, 5), new OleDbParameter(":price_rule", OleDbType.Numeric, 2), new OleDbParameter(":app_mode", OleDbType.Char, 1), new OleDbParameter(":inputcode1", OleDbType.VarChar, 8), new OleDbParameter(":inputcode2", OleDbType.VarChar, 8), new OleDbParameter(":state", OleDbType.Char, 1), new OleDbParameter(":cansell", OleDbType.Char, 1), new OleDbParameter(":id", OleDbType.Numeric, 5) }; parameters[0].Value = name; parameters[1].Value = account; parameters[2].Value = type; parameters[3].Value = price_rule; parameters[4].Value = app_mode; parameters[5].Value = inputcode1; parameters[6].Value = inputcode2; parameters[7].Value = state; parameters[8].Value = cansell; parameters[9].Value = id; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertBinTempMain(decimal?id, decimal sto_id, decimal acc_id, string no, decimal bInType, decimal com_id, char invoice_state, decimal nums, DateTime intime, decimal buy_emp, DateTime buy_time, decimal input_emp, DateTime input_time, char state, string remark, char acc_bill_state) { StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO MMIS_BIN_TEMP_MAIN("); strSql.Append("ID,STO_ID,ACC_ID,NO,CLASS,COM_ID,INVOICE_STATE,NUMS,INTIME,BUY_EMP,BUY_TIME,INPUT_EMP,INPUT_TIME,STATE,REMARK,ACC_BILL_STATE)"); strSql.Append(" values ("); strSql.Append(":id,:sto_id,:acc_id,:no,:class,:com_id,:invoice_state,:nums,:intime,:buy_emp,:buy_time,:input_emp,:input_time,:state,:remark,:acc_bill_state)"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 13), new OleDbParameter(":sto_id", OleDbType.Numeric, 5), new OleDbParameter(":acc_id", OleDbType.Numeric, 3), new OleDbParameter(":no", OleDbType.VarChar, 16), new OleDbParameter(":class", OleDbType.Numeric, 3), new OleDbParameter(":com_id", OleDbType.Numeric, 5), new OleDbParameter(":invoice_state", OleDbType.Char, 1), new OleDbParameter(":nums", OleDbType.Numeric, 2), new OleDbParameter(":intime", OleDbType.Date), new OleDbParameter(":buy_emp", OleDbType.Numeric, 5), new OleDbParameter(":buy_time", OleDbType.Date), new OleDbParameter(":input_emp", OleDbType.Numeric, 5), new OleDbParameter(":input_time", OleDbType.Date), new OleDbParameter(":state", OleDbType.Char, 1), new OleDbParameter(":remark", OleDbType.VarChar, 128), new OleDbParameter(":acc_bill_state", OleDbType.Char, 1) }; parameters[0].Value = id; parameters[1].Value = sto_id; parameters[2].Value = acc_id; parameters[3].Value = no; parameters[4].Value = bInType; parameters[5].Value = com_id; parameters[6].Value = invoice_state; parameters[7].Value = nums; parameters[8].Value = intime; parameters[9].Value = buy_emp; parameters[10].Value = buy_time; parameters[11].Value = input_emp; parameters[12].Value = input_time; parameters[13].Value = state; parameters[14].Value = remark; parameters[15].Value = acc_bill_state; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool updateBinMain(decimal ID, decimal Check_Emp, DateTime Check_Time, decimal NUMS, decimal Sto_ID, decimal Acc_ID, decimal Mat_ID, decimal Mat_Seq) { StringBuilder strSql = new StringBuilder(); strSql.Append("UPDATE MMIS_BIN_TEMP_MAIN SET "); strSql.Append("CHECK_EMP = :Check_Emp,"); strSql.Append("CHECK_TIME = :Check_Time,"); strSql.Append("ACC_BILL_STATE = '1' "); strSql.Append(" WHERE ID = :id"); OleDbParameter[] parameters = { new OleDbParameter(":Check_Emp", OleDbType.Numeric, 5), new OleDbParameter(":Check_Time", OleDbType.Date), new OleDbParameter(":id", OleDbType.Numeric, 13) }; parameters[0].Value = Check_Emp; parameters[1].Value = Check_Time; parameters[2].Value = ID; StringBuilder strSql1 = new StringBuilder(); strSql1.Append("UPDATE MMIS_STOCK SET "); strSql1.Append("CUR_NUM = CUR_NUM + :nums"); strSql1.Append(" WHERE STO_ID = :sto_id"); strSql1.Append(" AND ACC_ID = :acc_id"); strSql1.Append(" AND MAT_ID = :mat_id"); strSql1.Append(" AND MAT_SEQ = :mat_seq"); OleDbParameter[] parameters1 = { new OleDbParameter(":nums", OleDbType.Numeric, 5), new OleDbParameter(":sto_id", OleDbType.Numeric, 5), new OleDbParameter(":acc_id", OleDbType.Numeric, 3), new OleDbParameter(":mat_id", OleDbType.Numeric, 8), new OleDbParameter(":mat_seq", OleDbType.Numeric, 5) }; parameters1[0].Value = NUMS; parameters1[1].Value = Sto_ID; parameters1[2].Value = Acc_ID; parameters1[3].Value = Mat_ID; parameters1[4].Value = Mat_Seq; int rows1 = SqlDBHelper.ExecuteSql(strSql1.ToString(), parameters1); int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertCatalog(string code, string name, string Account, string Type, string Price_rule, string App_mode, string inputcode1, string inputcode2, string State, string Cansell) { StringBuilder strSql = new StringBuilder(); int id = Convert.ToInt32(code); int account = Convert.ToInt32(Account); int type = Convert.ToInt32(Type); int price_rule = Convert.ToInt32(Price_rule); char app_mode = Convert.ToChar(App_mode); char state = Convert.ToChar(State); char cansell = Convert.ToChar(Cansell); strSql.Append("INSERT INTO MMIS_CATALOG("); strSql.Append("ID,CODE,NAME,ACCOUNT,TYPE,PRICE_RULE,APP_MODE,INPUTCODE1,INPUTCODE2,STATE,CANSELL)"); strSql.Append(" values ("); strSql.Append(":id,:code,:name,:account,:type,:price_rule,:app_mode,:inputcode1,:inputcode2,:state,:cansell)"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 5), new OleDbParameter(":code", OleDbType.VarChar, 16), new OleDbParameter(":name", OleDbType.VarChar, 64), new OleDbParameter(":account", OleDbType.Numeric, 5), new OleDbParameter(":type", OleDbType.Numeric, 5), new OleDbParameter(":price_rule", OleDbType.Numeric, 2), new OleDbParameter(":app_mode", OleDbType.Char, 1), new OleDbParameter(":inputcode1", OleDbType.VarChar, 8), new OleDbParameter(":inputcode2", OleDbType.VarChar, 8), new OleDbParameter(":state", OleDbType.Char, 1), new OleDbParameter(":cansell", OleDbType.Char, 1) }; parameters[0].Value = id; parameters[1].Value = code; parameters[2].Value = name; parameters[3].Value = account; parameters[4].Value = type; parameters[5].Value = price_rule; parameters[6].Value = app_mode; parameters[7].Value = inputcode1; parameters[8].Value = inputcode2; parameters[9].Value = state; parameters[10].Value = cansell; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertAccount(string code, string name, string Price_rule, string Manage_type, string Use_stock, string inputcode1, string inputcode2, string State, string remark, string acc_emp_id, string danju) { StringBuilder strSql = new StringBuilder(); int? id = Convert.ToInt32(code); int? price_rule = Convert.ToInt32(Price_rule); char manage_type = Convert.ToChar(Manage_type); char use_stock = Convert.ToChar(Use_stock); char state = Convert.ToChar(State); strSql.Append("INSERT INTO MMIS_ACCOUNT_TYPE("); strSql.Append("ID,CODE,NAME,PRICE_RULE,MANAGE_TYPE,USE_STOCK,INPUTCODE1,INPUTCODE2,STATE,REMARK,ACC_EMP_ID,DANJU)"); strSql.Append(" values ("); strSql.Append(":id,:code,:name,:price_rule,:manage_type,:use_stock,:inputcode1,:inputcode2,:state,:remark,:acc_emp_id,:danju)"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 5), new OleDbParameter(":code", OleDbType.VarChar, 5), new OleDbParameter(":name", OleDbType.VarChar, 32), new OleDbParameter(":price_rule", OleDbType.Numeric, 2), new OleDbParameter(":manage_type", OleDbType.Char, 1), new OleDbParameter(":use_stock", OleDbType.Char, 1), new OleDbParameter(":inputcode1", OleDbType.VarChar, 8), new OleDbParameter(":inputcode2", OleDbType.VarChar, 8), new OleDbParameter(":state", OleDbType.Char, 1), new OleDbParameter(":remark", OleDbType.VarChar, 128), new OleDbParameter(":acc_emp_id", OleDbType.VarChar, 16), new OleDbParameter(":danju", OleDbType.VarChar, 10) }; parameters[0].Value = id; parameters[1].Value = code; parameters[2].Value = name; parameters[3].Value = price_rule; parameters[4].Value = manage_type; parameters[5].Value = use_stock; parameters[6].Value = inputcode1; parameters[7].Value = inputcode2; parameters[8].Value = state; parameters[9].Value = remark; parameters[10].Value = acc_emp_id; parameters[11].Value = danju; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertBOutTempMain(decimal?id, decimal sto_id, decimal acc_id, string no, decimal outtype, decimal outTarget, DateTime?intime, decimal app_emp, DateTime?app_time, decimal input_emp, DateTime input_time, char state, string remark, char acc_bill_state) { StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO MMIS_BOUT_TEMP_MAIN("); strSql.Append("ID,STO_ID,ACC_ID,NO,CLASS,INTIME,TARGET_ID,APP_EMP,APP_TIME,INPUT_EMP,INPUT_TIME,STATE,REMARK,ACC_BILL_STATE)"); strSql.Append(" values ("); strSql.Append(":id,:sto_id,:acc_id,:no,:class,:intime,:target_id,:app_emp,:app_time,:input_emp,:input_time,:state,:remark,:acc_bill_state)"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 13), new OleDbParameter(":sto_id", OleDbType.Numeric, 5), new OleDbParameter(":acc_id", OleDbType.Numeric, 3), new OleDbParameter(":no", OleDbType.VarChar, 16), new OleDbParameter(":class", OleDbType.Numeric, 3), new OleDbParameter(":intime", OleDbType.Date), new OleDbParameter(":target_id", OleDbType.Numeric, 5), new OleDbParameter(":app_emp", OleDbType.Numeric, 5), new OleDbParameter(":app_time", OleDbType.Date), new OleDbParameter(":input_emp", OleDbType.Numeric, 5), new OleDbParameter(":input_time", OleDbType.Date), new OleDbParameter(":state", OleDbType.Char, 1), new OleDbParameter(":remark", OleDbType.VarChar, 128), new OleDbParameter(":acc_bill_state", OleDbType.Char, 2) }; parameters[0].Value = id; parameters[1].Value = sto_id; parameters[2].Value = acc_id; parameters[3].Value = no; parameters[4].Value = outtype; parameters[5].Value = intime; parameters[6].Value = outTarget; parameters[7].Value = app_emp; parameters[8].Value = app_time; parameters[9].Value = input_emp; parameters[10].Value = input_time; parameters[11].Value = state; parameters[12].Value = remark; parameters[13].Value = acc_bill_state; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
//临时单新增明细 public bool insertBpriceTempDetail(decimal ID, decimal?SEQ, decimal MAT_ID, decimal MAT_SEQ, decimal NUMS, decimal RETAIL_PRICE_O, decimal RETAIL_PRICE_N, decimal TRADE_PRICE_O, decimal TRADE_PRICE_N, decimal MAX_PRICE_O, decimal MAX_PRICE_N, string BATCH_NO, DateTime EXPIRY_DATE, string REMARK) { StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO MMIS_BPRICE_TEMP_DETAIL("); strSql.Append("ID,SEQ,MAT_ID,MAT_SEQ,NUMS,RETAIL_PRICE_O,RETAIL_PRICE_N,TRADE_PRICE_O,TRADE_PRICE_N,MAX_PRICE_O,MAX_PRICE_N,BATCH_NO,EXPIRY_DATE,REMARK)"); strSql.Append(" values ("); strSql.Append(":id,:seq,:mat_id,:mat_seq,:nums,:retail_price_o,:retail_price_n,:trade_price_o,:trade_price_n,:max_price_o,:max_price_n,:batch_no,:expipy_date,:remark)"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 13), new OleDbParameter(":seq", OleDbType.Numeric, 5), new OleDbParameter(":mat_id", OleDbType.Numeric, 8), new OleDbParameter(":mat_seq", OleDbType.Numeric, 5), new OleDbParameter(":nums", OleDbType.Numeric, 12), new OleDbParameter(":retail_price_o", OleDbType.Numeric, 16), new OleDbParameter(":retail_price_n", OleDbType.Numeric, 16), new OleDbParameter(":trade_price_o", OleDbType.Numeric, 16), new OleDbParameter(":trade_price_n", OleDbType.Numeric, 16), new OleDbParameter(":max_price_o", OleDbType.Numeric, 16), new OleDbParameter(":max_price_n", OleDbType.Numeric, 16), new OleDbParameter(":batch_no", OleDbType.VarChar, 32), new OleDbParameter(":expipy_date", OleDbType.Date), new OleDbParameter(":remark", OleDbType.VarChar, 128) }; parameters[0].Value = ID; parameters[1].Value = SEQ; parameters[2].Value = MAT_ID; parameters[3].Value = MAT_SEQ; parameters[4].Value = NUMS; parameters[5].Value = RETAIL_PRICE_O; parameters[6].Value = RETAIL_PRICE_N; parameters[7].Value = TRADE_PRICE_O; parameters[8].Value = TRADE_PRICE_N; parameters[9].Value = MAX_PRICE_O; parameters[10].Value = MAX_PRICE_N; parameters[11].Value = BATCH_NO; parameters[12].Value = EXPIRY_DATE; parameters[13].Value = REMARK; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool insertBinTempDetail(decimal id, decimal seq, string invoiceno, decimal mat_id, decimal mat_seq, decimal nums, decimal buying_price, decimal retail_price, decimal trade_price, decimal return_num, decimal return_reason, string batch_no, DateTime expipy_date, string remark) { StringBuilder strSql = new StringBuilder(); strSql.Append("INSERT INTO MMIS_BIN_TEMP_DETAIL("); strSql.Append("ID,SEQ,INVOICENO,MAT_ID,MAT_SEQ,NUMS,BUYING_PRICE,RETAIL_PRICE,TRADE_PRICE,RETURN_NUM,RETURN_REASON,BATCH_NO,EXPIRY_DATE,REMARK)"); strSql.Append(" values ("); strSql.Append(":id,:seq,:invoiceno,:mat_id,:mat_seq,:nums,:buying_price,:retail_price,:trade_price,:return_num,:return_reason,:batch_no,:expipy_date,:remark)"); OleDbParameter[] parameters = { new OleDbParameter(":id", OleDbType.Numeric, 13), new OleDbParameter(":seq", OleDbType.Numeric, 5), new OleDbParameter(":invoiceno", OleDbType.VarChar, 16), new OleDbParameter(":mat_id", OleDbType.Numeric, 8), new OleDbParameter(":mat_seq", OleDbType.Numeric, 5), new OleDbParameter(":nums", OleDbType.Numeric, 10), new OleDbParameter(":buying_price", OleDbType.Numeric, 12), new OleDbParameter(":retail_price", OleDbType.Numeric, 12), new OleDbParameter(":trade_price", OleDbType.Numeric, 12), new OleDbParameter(":return_num", OleDbType.Numeric, 10), new OleDbParameter(":return_reason", OleDbType.Numeric, 3), new OleDbParameter(":batch_no", OleDbType.VarChar, 32), new OleDbParameter(":expipy_date", OleDbType.Date), new OleDbParameter(":remark", OleDbType.VarChar, 128) }; parameters[0].Value = id; parameters[1].Value = seq; parameters[2].Value = invoiceno; parameters[3].Value = mat_id; parameters[4].Value = mat_seq; parameters[5].Value = nums; parameters[6].Value = buying_price; parameters[7].Value = retail_price; parameters[8].Value = trade_price; parameters[9].Value = return_num; parameters[10].Value = return_reason; parameters[11].Value = batch_no; parameters[12].Value = expipy_date; parameters[13].Value = remark; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public bool updateStorage(string code, string name, string grade, string type, string tolink, string inputcode1, string inputcode2, string state, string remark) { StringBuilder strSql = new StringBuilder(); char Grade = Convert.ToChar(grade); char Type = Convert.ToChar(type); char State = Convert.ToChar(state); strSql.Append("UPDATE MMIS_STORAGE SET "); strSql.Append("NAME = :name,"); strSql.Append("GRADE = :grade,"); strSql.Append("TYPE = :type,"); strSql.Append("TOLINK = :tolink,"); strSql.Append("INPUTCODE1 = :inputcode1,"); strSql.Append("INPUTCODE2 = :inputcode2,"); strSql.Append("STATE = :state,"); strSql.Append("REMARK = :remark"); strSql.Append(" WHERE CODE = :code"); OleDbParameter[] parameters = { new OleDbParameter(":name", OleDbType.VarChar, 32), new OleDbParameter(":grade", OleDbType.Char, 2), new OleDbParameter(":type", OleDbType.Char, 1), new OleDbParameter(":tolink", OleDbType.VarChar, 16), new OleDbParameter(":inputcode1", OleDbType.VarChar, 8), new OleDbParameter(":inputcode2", OleDbType.VarChar, 8), new OleDbParameter(":state", OleDbType.Char, 1), new OleDbParameter(":remark", OleDbType.VarChar, 128), new OleDbParameter(":code", OleDbType.VarChar, 5) }; parameters[0].Value = name; parameters[1].Value = Grade; parameters[2].Value = Type; parameters[3].Value = tolink; parameters[4].Value = inputcode1; parameters[5].Value = inputcode2; parameters[6].Value = State; parameters[7].Value = remark; parameters[8].Value = code; int rows = SqlDBHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }