public bool Delete(MulaolaoLibrary.ContractreviewEntity _mode, string logins) { ArrayList SQLString = new ArrayList( ); StringBuilder strSql = new StringBuilder( ); strSql.AppendFormat("DELETE FROM R_PQL WHERE idx={0}", _mode.idx); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _mode.HT64, strSql.ToString( ).Replace("'", "''"), "删除", "删除")); strSql = new StringBuilder( ); strSql.AppendFormat("UPDATE R_PQF SET PQF25='{0}' WHERE PQF01='{1}'", _mode.HT07, _mode.HT01); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _mode.HT64, strSql.ToString( ).Replace("'", "''"), "删除", "删除编辑001PQF25字段")); return(SqlHelper.ExecuteSqlTran(SQLString)); }
public bool Insert(MulaolaoLibrary.ContractreviewEntity _mode, string logins) { ArrayList SQLString = new ArrayList( ); StringBuilder strSql = new StringBuilder( ); strSql.AppendFormat("INSERT INTO R_PQL (HT64,HT01,HT02,HT07,HT65,HT66) VALUES ('{0}','{1}','{2}','{3}','{4}','{5}')", _mode.HT64, _mode.HT01, _mode.HT02, _mode.HT07, _mode.HT65, _mode.HT66); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _mode.HT64, strSql.ToString( ).Replace("'", "''"), "新建", "新建")); strSql = new StringBuilder( ); strSql.AppendFormat("UPDATE R_PQF SET PQF25='{0}',PQF17='{1}',PQF66='{2}' WHERE PQF01='{3}'", _mode.HT07, _mode.HT65, _mode.HT66, _mode.HT01); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _mode.HT64, strSql.ToString( ).Replace("'", "''"), "新建", "更改001生产车间")); strSql = new StringBuilder( ); strSql.AppendFormat("UPDATE R_PQAE SET AE08='{0}' WHERE AE02='{1}'", _mode.HT66, _mode.HT01); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _mode.HT64, strSql.ToString( ).Replace("'", "''"), "新建", "更改001生产车间")); return(SqlHelper.ExecuteSqlTran(SQLString)); }
public bool Update(MulaolaoLibrary.ContractreviewEntity _mode, string logins) { ArrayList SQLString = new ArrayList( ); StringBuilder strSql = new StringBuilder( ); strSql.AppendFormat("UPDATE R_PQL SET HT01='{0}',HT07='{1}',HT65='{2}',HT66='{3}' WHERE idx={4}", _mode.HT01, _mode.HT07, _mode.HT65, _mode.HT66, _mode.idx); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _mode.HT64, strSql.ToString( ).Replace("'", "''"), "编辑", "编辑流水等")); strSql = new StringBuilder( ); strSql.AppendFormat("UPDATE R_PQF SET PQF25='{0}',PQF17='{1}',PQF66='{2}' WHERE PQF01='{3}'", _mode.HT07, _mode.HT65, _mode.HT66, _mode.HT01); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _mode.HT64, strSql.ToString( ).Replace("'", "''"), "编辑", "编辑流水等")); strSql = new StringBuilder( ); strSql.AppendFormat("UPDATE R_PQAE SET AE08='{0}' WHERE AE02='{1}'", _mode.HT66, _mode.HT01); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _mode.HT64, strSql.ToString( ).Replace("'", "''"), "编辑", "编辑流水等")); return(SqlHelper.ExecuteSqlTran(SQLString)); }
public bool saveTo(DataTable table, string logins) { ArrayList SQLString = new ArrayList( ); StringBuilder strSql = new StringBuilder( ); MulaolaoLibrary.ContractreviewEntity _model = new MulaolaoLibrary.ContractreviewEntity( ); for (int i = 0; i < table.Rows.Count; i++) { _model.HT01 = table.Rows [i] ["PQF01"].ToString( ); _model.HT66 = table.Rows [i] ["HT66"].ToString( ); if (Exists(_model.HT01)) { strSql = new StringBuilder( ); strSql.AppendFormat("UPDATE R_PQAE SET AE08='{0}' WHERE AE02='{1}'", _model.HT66, _model.HT01); SQLString.Add(strSql.ToString( )); SQLString.Add(Drity.DrityOfComparation("R_021", "合同评审表(R_021)", logins, Drity.GetDt( ), _model.HT64, strSql.ToString( ).Replace("'", "''"), "编辑", "编辑250生产车间")); } } return(SqlHelper.ExecuteSqlTran(SQLString)); }
public bool Insert(MulaolaoLibrary.ContractreviewEntity _mode, string logins) { return(_dal.Insert(_mode, logins)); }
public bool Delete(MulaolaoLibrary.ContractreviewEntity _mode, string logins) { return(_dal.Delete(_mode, logins)); }
public bool Edit(MulaolaoLibrary.ContractreviewEntity model) { return(_dal.Edit(model)); }
public bool Save(MulaolaoLibrary.ContractreviewEntity model) { return(_dal.Save(model)); }
public bool Save(MulaolaoLibrary.ContractreviewEntity model) { Hashtable SQLString = new Hashtable( ); StringBuilder strSql = new StringBuilder( ); strSql.Append("update R_PQL set "); strSql.Append("HT02=@HT02,"); strSql.Append("HT03=@HT03,"); strSql.Append("HT04=@HT04,"); strSql.Append("HT08=@HT08,"); strSql.Append("HT09=@HT09,"); strSql.Append("HT10=@HT10,"); strSql.Append("HT11=@HT11,"); strSql.Append("HT12=@HT12,"); strSql.Append("HT18=@HT18,"); strSql.Append("HT20=@HT20,"); strSql.Append("HT21=@HT21,"); strSql.Append("HT23=@HT23,"); strSql.Append("HT25=@HT25,"); strSql.Append("HT26=@HT26,"); strSql.Append("HT28=@HT28,"); strSql.Append("HT30=@HT30,"); strSql.Append("HT32=@HT32,"); strSql.Append("HT34=@HT34,"); strSql.Append("HT35=@HT35,"); strSql.Append("HT37=@HT37,"); strSql.Append("HT39=@HT39,"); strSql.Append("HT40=@HT40,"); strSql.Append("HT42=@HT42,"); strSql.Append("HT44=@HT44,"); strSql.Append("HT45=@HT45,"); strSql.Append("HT47=@HT47,"); strSql.Append("HT49=@HT49,"); strSql.Append("HT51=@HT51,"); strSql.Append("HT52=@HT52,"); strSql.Append("HT55=@HT55,"); strSql.Append("HT58=@HT58,"); strSql.Append("HT59=@HT59,"); strSql.Append("HT60=@HT60,"); strSql.Append("HT61=@HT61,"); strSql.Append("HT62=@HT62,"); strSql.Append("HT63=@HT63 "); strSql.Append(" where HT64=@HT64"); SqlParameter [] parameters = { new SqlParameter("@HT02", SqlDbType.NVarChar, 20), new SqlParameter("@HT03", SqlDbType.NVarChar, 20), new SqlParameter("@HT04", SqlDbType.Date, 3), new SqlParameter("@HT08", SqlDbType.VarBinary, -1), new SqlParameter("@HT09", SqlDbType.NVarChar, 10), new SqlParameter("@HT10", SqlDbType.NVarChar, 10), new SqlParameter("@HT11", SqlDbType.NVarChar, 10), new SqlParameter("@HT12", SqlDbType.Date, 3), new SqlParameter("@HT18", SqlDbType.NVarChar, 100), new SqlParameter("@HT20", SqlDbType.NVarChar, 100), new SqlParameter("@HT21", SqlDbType.NVarChar, 50), new SqlParameter("@HT23", SqlDbType.NVarChar, 100), new SqlParameter("@HT25", SqlDbType.NVarChar, 255), new SqlParameter("@HT26", SqlDbType.NVarChar, 50), new SqlParameter("@HT28", SqlDbType.NVarChar, 100), new SqlParameter("@HT30", SqlDbType.NVarChar, 100), new SqlParameter("@HT32", SqlDbType.NVarChar, 100), new SqlParameter("@HT34", SqlDbType.NVarChar, 100), new SqlParameter("@HT35", SqlDbType.NVarChar, 50), new SqlParameter("@HT37", SqlDbType.NVarChar, 100), new SqlParameter("@HT39", SqlDbType.NVarChar, 100), new SqlParameter("@HT40", SqlDbType.NVarChar, 50), new SqlParameter("@HT42", SqlDbType.NVarChar, 100), new SqlParameter("@HT44", SqlDbType.NVarChar, 100), new SqlParameter("@HT45", SqlDbType.NVarChar, 50), new SqlParameter("@HT47", SqlDbType.NVarChar, 100), new SqlParameter("@HT49", SqlDbType.NVarChar, 100), new SqlParameter("@HT51", SqlDbType.NVarChar, 100), new SqlParameter("@HT52", SqlDbType.NVarChar, 50), new SqlParameter("@HT55", SqlDbType.NVarChar, 255), new SqlParameter("@HT58", SqlDbType.VarBinary, -1), new SqlParameter("@HT59", SqlDbType.VarBinary, -1), new SqlParameter("@HT60", SqlDbType.VarBinary, -1), new SqlParameter("@HT61", SqlDbType.VarBinary, -1), new SqlParameter("@HT62", SqlDbType.VarBinary, -1), new SqlParameter("@HT63", SqlDbType.NVarChar, -1), new SqlParameter("@HT64", SqlDbType.NVarChar, 20) }; parameters [0].Value = model.HT02; parameters [1].Value = model.HT03; parameters [2].Value = model.HT04; parameters [3].Value = model.HT08; parameters [4].Value = model.HT09; parameters [5].Value = model.HT10; parameters [6].Value = model.HT11; parameters [7].Value = model.HT12; parameters [8].Value = model.HT18; parameters [9].Value = model.HT20; parameters [10].Value = model.HT21; parameters [11].Value = model.HT23; parameters [12].Value = model.HT25; parameters [13].Value = model.HT26; parameters [14].Value = model.HT28; parameters [15].Value = model.HT30; parameters [16].Value = model.HT32; parameters [17].Value = model.HT34; parameters [18].Value = model.HT35; parameters [19].Value = model.HT37; parameters [20].Value = model.HT39; parameters [21].Value = model.HT40; parameters [22].Value = model.HT42; parameters [23].Value = model.HT44; parameters [24].Value = model.HT45; parameters [25].Value = model.HT47; parameters [26].Value = model.HT49; parameters [27].Value = model.HT51; parameters [28].Value = model.HT52; parameters [29].Value = model.HT55; parameters [30].Value = model.HT58; parameters [31].Value = model.HT59; parameters [32].Value = model.HT60; parameters [33].Value = model.HT61; parameters [34].Value = model.HT62; parameters [35].Value = model.HT63; parameters [36].Value = model.HT64; SQLString.Add(strSql, parameters); strSql = new StringBuilder( ); strSql.Append("UPDATE R_PQF SET PQF30=@PQF30 WHERE PQF02=@PQF02"); SqlParameter [] parameter = { new SqlParameter("@PQF30", SqlDbType.Date, 3), new SqlParameter("@PQF02", SqlDbType.NVarChar, 20) }; parameter [0].Value = model.HT04; parameter [1].Value = model.HT02; SQLString.Add(strSql, parameter); return(SqlHelper.ExecuteSqlTran(SQLString)); }
public bool Edit(MulaolaoLibrary.ContractreviewEntity model) { Hashtable SQLString = new Hashtable( ); StringBuilder strSql = new StringBuilder( ); strSql.Append("INSERT INTO R_PQL (HT02,HT03,HT04,HT08,HT09,HT10,HT11,HT12,HT18,HT20,HT21,HT23,HT25,HT26,HT28,HT30,HT32,HT34,HT35,HT37,HT39,HT40,HT42,HT44,HT45,HT47,HT49,HT51,HT52,HT55,HT58,HT59,HT60,HT61,HT62,HT63,HT64)"); strSql.Append(" VALUES (@HT02,@HT03,@HT04,@HT08,@HT09,@HT10,@HT11,@HT12,@HT18,@HT20,@HT21,@HT23,@HT25,@HT26,@HT28,@HT30,@HT32,@HT34,@HT35,@HT37,@HT39,@HT40,@HT42,@HT44,@HT45,@HT47,@HT49,@HT51,@HT52,@HT55,@HT58,@HT59,@HT60,@HT61,@HT62,@HT63,@HT64)"); SqlParameter [] parameters = { new SqlParameter("@HT02", SqlDbType.NVarChar, 20), new SqlParameter("@HT03", SqlDbType.NVarChar, 20), new SqlParameter("@HT04", SqlDbType.Date, 3), new SqlParameter("@HT08", SqlDbType.VarBinary, -1), new SqlParameter("@HT09", SqlDbType.NVarChar, 10), new SqlParameter("@HT10", SqlDbType.NVarChar, 10), new SqlParameter("@HT11", SqlDbType.NVarChar, 10), new SqlParameter("@HT12", SqlDbType.Date, 3), new SqlParameter("@HT18", SqlDbType.NVarChar, 100), new SqlParameter("@HT20", SqlDbType.NVarChar, 100), new SqlParameter("@HT21", SqlDbType.NVarChar, 50), new SqlParameter("@HT23", SqlDbType.NVarChar, 100), new SqlParameter("@HT25", SqlDbType.NVarChar, 255), new SqlParameter("@HT26", SqlDbType.NVarChar, 50), new SqlParameter("@HT28", SqlDbType.NVarChar, 100), new SqlParameter("@HT30", SqlDbType.NVarChar, 100), new SqlParameter("@HT32", SqlDbType.NVarChar, 100), new SqlParameter("@HT34", SqlDbType.NVarChar, 100), new SqlParameter("@HT35", SqlDbType.NVarChar, 50), new SqlParameter("@HT37", SqlDbType.NVarChar, 100), new SqlParameter("@HT39", SqlDbType.NVarChar, 100), new SqlParameter("@HT40", SqlDbType.NVarChar, 50), new SqlParameter("@HT42", SqlDbType.NVarChar, 100), new SqlParameter("@HT44", SqlDbType.NVarChar, 100), new SqlParameter("@HT45", SqlDbType.NVarChar, 50), new SqlParameter("@HT47", SqlDbType.NVarChar, 100), new SqlParameter("@HT49", SqlDbType.NVarChar, 100), new SqlParameter("@HT51", SqlDbType.NVarChar, 100), new SqlParameter("@HT52", SqlDbType.NVarChar, 50), new SqlParameter("@HT55", SqlDbType.NVarChar, 255), new SqlParameter("@HT58", SqlDbType.VarBinary, -1), new SqlParameter("@HT59", SqlDbType.VarBinary, -1), new SqlParameter("@HT60", SqlDbType.VarBinary, -1), new SqlParameter("@HT61", SqlDbType.VarBinary, -1), new SqlParameter("@HT62", SqlDbType.VarBinary, -1), new SqlParameter("@HT63", SqlDbType.NVarChar, -1), new SqlParameter("@HT64", SqlDbType.NVarChar, 20) }; parameters [0].Value = model.HT02; parameters [1].Value = model.HT03; parameters [2].Value = model.HT04; parameters [3].Value = model.HT08; parameters [4].Value = model.HT09; parameters [5].Value = model.HT10; parameters [6].Value = model.HT11; parameters [7].Value = model.HT12; parameters [8].Value = model.HT18; parameters [9].Value = model.HT20; parameters [10].Value = model.HT21; parameters [11].Value = model.HT23; parameters [12].Value = model.HT25; parameters [13].Value = model.HT26; parameters [14].Value = model.HT28; parameters [15].Value = model.HT30; parameters [16].Value = model.HT32; parameters [17].Value = model.HT34; parameters [18].Value = model.HT35; parameters [19].Value = model.HT37; parameters [20].Value = model.HT39; parameters [21].Value = model.HT40; parameters [22].Value = model.HT42; parameters [23].Value = model.HT44; parameters [24].Value = model.HT45; parameters [25].Value = model.HT47; parameters [26].Value = model.HT49; parameters [27].Value = model.HT51; parameters [28].Value = model.HT52; parameters [29].Value = model.HT55; parameters [30].Value = model.HT58; parameters [31].Value = model.HT59; parameters [32].Value = model.HT60; parameters [33].Value = model.HT61; parameters [34].Value = model.HT62; parameters [35].Value = model.HT63; parameters [36].Value = model.HT64; SQLString.Add(strSql, parameters); strSql = new StringBuilder( ); strSql.Append("UPDATE R_PQF SET PQF30=@PQF30 WHERE PQF02=@PQF02"); SqlParameter [] parameter = { new SqlParameter("@PQF30", SqlDbType.Date, 3), new SqlParameter("@PQF02", SqlDbType.NVarChar, 20) }; parameter [0].Value = model.HT04; parameter [1].Value = model.HT02; SQLString.Add(strSql, parameter); return(SqlHelper.ExecuteSqlTran(SQLString)); }