public void InsertSupply(DataTable supplyTable, string lineCode, string orderDate, int batchNo) { if (this.lineCode != lineCode) { this.lineCode = lineCode; string sql = string.Format("SELECT CASE WHEN MAX(SERIALNO) IS NULL THEN 1000 ELSE MAX(SERIALNO) END FROM AS_SC_SUPPLY WHERE LINECODE='{0}' AND ORDERDATE = '{1}' AND BATCHNO = {2} ", lineCode, orderDate, batchNo); serialNo = Convert.ToInt32(ExecuteScalar(sql)); } foreach (DataRow row in supplyTable.Rows) { SqlCreate sqlCreate = new SqlCreate("AS_SC_SUPPLY", SqlType.INSERT); sqlCreate.AppendQuote("ORDERDATE", row["ORDERDATE"]); sqlCreate.Append("BATCHNO", row["BATCHNO"]); sqlCreate.Append("SERIALNO", serialNo++); sqlCreate.AppendQuote("LINECODE", row["LINECODE"]); sqlCreate.Append("ORIGINALSORTNO", row["SORTNO"]); sqlCreate.Append("SORTNO", row["SORTNO"]); sqlCreate.Append("GROUPNO", row["GROUPNO"]); sqlCreate.Append("CHANNELGROUP", row["CHANNELGROUP"]); sqlCreate.AppendQuote("CHANNELCODE", row["CHANNELCODE"]); sqlCreate.AppendQuote("CIGARETTECODE", row["CIGARETTECODE"]); sqlCreate.AppendQuote("CIGARETTENAME", row["CIGARETTENAME"]); ExecuteNonQuery(sqlCreate.GetSQL()); } }
/// <summary> /// 2010-11-21 /// </summary> /// <param name="supplyTable"></param> public void InsertSupply(DataTable supplyTable, bool isUseSerialNo) { DataRow[] rows = supplyTable.Select("", "BATCH,SERIALNO"); int serialNo = 1; foreach (DataRow row in rows) { SqlCreate sqlCreate = new SqlCreate("AS_SC_SUPPLY", SqlType.INSERT); sqlCreate.AppendQuote("ORDERDATE", row["ORDERDATE"]); sqlCreate.Append("BATCHNO", row["BATCHNO"]); sqlCreate.AppendQuote("LINECODE", row["LINECODE"]); sqlCreate.Append("SERIALNO", isUseSerialNo ? row["SERIALNO"] : serialNo++); sqlCreate.Append("ORIGINALSORTNO", row["SORTNO"]); sqlCreate.Append("SORTNO", row["SORTNO"]); sqlCreate.AppendQuote("CIGARETTECODE", row["CIGARETTECODE"]); sqlCreate.AppendQuote("CIGARETTENAME", row["CIGARETTENAME"]); sqlCreate.AppendQuote("CHANNELCODE", row["CHANNELCODE"]); sqlCreate.Append("CHANNELGROUP", row["CHANNELGROUP"]); sqlCreate.Append("GROUPNO", row["GROUPNO"]); ExecuteNonQuery(sqlCreate.GetSQL()); } }
//public void SaveOrder(DataTable orderTable) //{ // foreach (DataRow orderRow in orderTable.Rows) // { // SqlCreate sql = new SqlCreate("AS_SC_ORDER", SqlType.INSERT); // sql.AppendQuote("ORDERDATE", orderRow["ORDERDATE"]); // sql.Append("BATCHNO", orderRow["BATCHNO"]); // sql.AppendQuote("LINECODE", orderRow["LINECODE"]); // sql.Append("SORTNO", orderRow["SORTNO"]); // sql.Append("PALLETNO", orderRow["PALLETNO"]); // sql.AppendQuote("CHANNELCODE", orderRow["CHANNELCODE"]); // sql.AppendQuote("CIGARETTECODE", orderRow["CIGARETTECODE"]); // sql.AppendQuote("CIGARETTENAME", orderRow["CIGARETTENAME"]); // sql.Append("QUANTITY", orderRow["QUANTITY"]); // ExecuteNonQuery(sql.GetSQL()); // } //} public void SaveOrderMaster(DataTable masterTable) { foreach (DataRow orderRow in masterTable.Rows) { SqlCreate sql = new SqlCreate("AS_SC_PALLETMASTER", SqlType.INSERT); sql.AppendQuote("ORDERDATE", orderRow["ORDERDATE"]); sql.Append("BATCHNO", orderRow["BATCHNO"]); sql.AppendQuote("LINECODE", orderRow["LINECODE"]); sql.Append("SORTNO", orderRow["SORTNO"]); sql.AppendQuote("ORDERID", orderRow["ORDERID"]); sql.AppendQuote("AREACODE", orderRow["AREACODE"]); sql.AppendQuote("AREANAME", orderRow["AREANAME"]); sql.AppendQuote("ROUTECODE", orderRow["ROUTECODE"]); sql.AppendQuote("ROUTENAME", orderRow["ROUTENAME"]); sql.AppendQuote("CUSTOMERCODE", orderRow["CUSTOMERCODE"]); sql.AppendQuote("CUSTOMERNAME", orderRow["CUSTOMERNAME"]); sql.AppendQuote("ADDRESS", orderRow["ADDRESS"]); sql.AppendQuote("ORDERNO", orderRow["ORDERNO"]); sql.Append("QUANTITY", orderRow["QUANTITY"]); sql.Append("ABNORMITY_QUANTITY", orderRow["ABNORMITY_QUANTITY"]); ExecuteNonQuery(sql.GetSQL()); } }
internal void InsertStockChannelUsed(string orderDate, int batchNo, DataTable channelTable) { foreach (DataRow row in channelTable.Rows) { SqlCreate sqlCreate = new SqlCreate("AS_SC_STOCKCHANNELUSED", SqlType.INSERT); sqlCreate.AppendQuote("ORDERDATE", orderDate); sqlCreate.Append("BATCHNO", batchNo); sqlCreate.AppendQuote("CHANNELCODE", row["CHANNELCODE"]); sqlCreate.AppendQuote("CHANNELNAME", row["CHANNELNAME"]); sqlCreate.AppendQuote("CHANNELTYPE", row["CHANNELTYPE"]); sqlCreate.AppendQuote("CIGARETTECODE", row["CIGARETTECODE"]); sqlCreate.AppendQuote("CIGARETTENAME", row["CIGARETTENAME"]); sqlCreate.Append("QUANTITY", row["QUANTITY"]); sqlCreate.Append("REMAINQUANTITY", row["REMAINQUANTITY"]); sqlCreate.Append("ORDERNO", row["ORDERNO"]); sqlCreate.Append("LEDNO", row["LEDNO"]); sqlCreate.AppendQuote("STATUS", row["STATUS"]); sqlCreate.AppendQuote("ISSTOCKIN", row["ISSTOCKIN"]); ExecuteNonQuery(sqlCreate.GetSQL()); } }
public void InsertNewSupplyOrders(DataTable newSupplyOrders) { foreach (DataRow dataRow in newSupplyOrders.Rows) { SqlCreate sqlCreate = new SqlCreate("AS_SC_ORDER", SqlType.INSERT); sqlCreate.AppendQuote("ORDERDATE", dataRow["ORDERDATE"]); sqlCreate.AppendQuote("BATCHNO", dataRow["BATCHNO"]); sqlCreate.AppendQuote("LINECODE", dataRow["LINECODE"]); sqlCreate.Append("SORTNO", dataRow["SORTNO"]); sqlCreate.AppendQuote("ORDERID", dataRow["ORDERID"]); sqlCreate.Append("ORDERNO", dataRow["ORDERNO"]); sqlCreate.AppendQuote("CIGARETTECODE", dataRow["CIGARETTECODE"]); sqlCreate.AppendQuote("CIGARETTENAME", dataRow["CIGARETTENAME"]); sqlCreate.AppendQuote("CHANNELCODE", dataRow["CHANNELCODE"]); sqlCreate.AppendQuote("CHANNELGROUP", dataRow["CHANNELGROUP"]); sqlCreate.AppendQuote("CHANNELORDER", dataRow["CHANNELORDER"]); sqlCreate.Append("QUANTITY", dataRow["QUANTITY"]); sqlCreate.Append("EXPORTNO", dataRow["EXPORTNO"]); sqlCreate.Append("PACKNO", dataRow["PACKNO"]); ExecuteNonQuery(sqlCreate.GetSQL()); } }
public void InsertHandSupplyOrders(DataTable newSupplyOrders) { foreach (DataRow dataRow in newSupplyOrders.Rows) { SqlCreate sqlCreate = new SqlCreate("AS_SC_HANDLESUPPLY", SqlType.INSERT); sqlCreate.AppendQuote("ORDERDATE", dataRow["ORDERDATE"]); sqlCreate.AppendQuote("BATCHNO", dataRow["BATCHNO"]); sqlCreate.AppendQuote("LINECODE", dataRow["LINECODE"]); sqlCreate.Append("SORTNO", dataRow["SORTNO"]); sqlCreate.AppendQuote("SUPPLYBATCH", dataRow["SUPPLYBATCH"]); sqlCreate.AppendQuote("ORDERID", dataRow["ORDERID"]); sqlCreate.AppendQuote("CIGARETTECODE", dataRow["CIGARETTECODE"]); sqlCreate.AppendQuote("CIGARETTENAME", dataRow["CIGARETTENAME"]); sqlCreate.AppendQuote("CHANNELCODE", dataRow["CHANNELCODE"]); sqlCreate.Append("QUANTITY", dataRow["QUANTITY"]); sqlCreate.AppendQuote("STATUS", "0"); ExecuteNonQuery(sqlCreate.GetSQL()); } }
/// <summary> /// 2010-11-21 /// </summary> /// <param name="channelTable"></param> public void UpdateQuantity(DataTable channelTable, bool isUseBalance) { foreach (DataRow channelRow in channelTable.Rows) { string sql = "UPDATE AS_SC_CHANNELUSED SET CIGARETTECODE = '{0}',CIGARETTENAME = '{1}',QUANTITY={2} " + " WHERE ORDERDATE='{3}' AND BATCHNO='{4}' AND LINECODE='{5}' AND CHANNELCODE='{6}'"; ExecuteNonQuery(string.Format(sql, channelRow["CIGARETTECODE"], channelRow["CIGARETTENAME"], channelRow["QUANTITY"], channelRow["ORDERDATE"], channelRow["BATCHNO"].ToString().Trim(), channelRow["LINECODE"], channelRow["CHANNELCODE"])); if (isUseBalance && channelRow["CHANNELTYPE"].ToString() == "3" && channelRow["CIGARETTECODE"].ToString() == channelRow["D_CIGARETTECODE"].ToString()) { SqlCreate sqlCreate = new SqlCreate("AS_SC_BALANCE", SqlType.INSERT); sqlCreate.AppendQuote("ORDERDATE", channelRow["ORDERDATE"]); sqlCreate.Append("BATCHNO", channelRow["BATCHNO"]); sqlCreate.AppendQuote("CHANNELID", channelRow["CHANNELID"]); sqlCreate.AppendQuote("LINECODE", channelRow["LINECODE"]); sqlCreate.AppendQuote("CHANNELCODE", channelRow["CHANNELCODE"]); sqlCreate.AppendQuote("CHANNELNAME", channelRow["CHANNELNAME"]); sqlCreate.AppendQuote("CIGARETTECODE", channelRow["CIGARETTECODE"]); sqlCreate.AppendQuote("CIGARETTENAME", channelRow["CIGARETTENAME"]); int quantity = Convert.ToInt32(channelRow["QUANTITY"]) % 50; int balance = Convert.ToInt32(channelRow["BALANCE"]); sqlCreate.Append("QUANTITY", balance >= quantity ? 0 - quantity : 50 - quantity); ExecuteNonQuery(sqlCreate.GetSQL()); } else { ExecuteNonQuery(string.Format("DELETE FROM AS_SC_BALANCE WHERE CHANNELID = '{0}'", channelRow["CHANNELID"])); } } }
public void UpdateEntity(string lineCode, string status) { SqlCreate sqlCreate = new SqlCreate("AS_BI_LINEINFO", SqlType.UPDATE); sqlCreate.AppendQuote("STATUS", status); sqlCreate.AppendWhereQuote("LINECODE", lineCode); ExecuteNonQuery(sqlCreate.GetSQL()); }
internal void InsertEntity(string orderDate, string orderId) { SqlCreate sqlCreate = new SqlCreate("AS_HANDLE_SORT_ORDER", SqlType.INSERT); sqlCreate.AppendQuote("ORDERDATE", orderDate); sqlCreate.AppendQuote("ORDERID", orderId); ExecuteNonQuery(sqlCreate.GetSQL()); }
/// <summary> /// 更新 /// </summary> /// <param name="dataSet"></param> public void UpdateEntity(string sortID, string areaCode) { SqlCreate sqlCreate = new SqlCreate("AS_BI_AREA", SqlType.UPDATE); sqlCreate.Append("SORTID", sortID); sqlCreate.AppendWhereQuote("AREACODE", areaCode); ExecuteNonQuery(sqlCreate.GetSQL()); }
/// <summary> /// ¸üР/// </summary> /// <param name="dataSet"></param> public void UpdateEntity(string sortID, string lineCode, string routeCode) { SqlCreate sqlCreate = new SqlCreate("AS_BI_ROUTE", SqlType.UPDATE); sqlCreate.Append("SORTID", sortID); sqlCreate.AppendQuote("LINECODE", lineCode); sqlCreate.AppendWhereQuote("ROUTECODE", routeCode); ExecuteNonQuery(sqlCreate.GetSQL()); }
public void UpdateEntity(string departmentID, string departmentName, string remark) { SqlCreate sqlCreate = new SqlCreate("AS_BI_DEPARTMENT", SqlType.UPDATE); sqlCreate.AppendQuote("DEPARTMENTNAME", departmentName); sqlCreate.AppendQuote("REMARK", remark); sqlCreate.AppendWhereQuote("DEPARTMENTID", departmentID); ExecuteNonQuery(sqlCreate.GetSQL()); }
public void InsertEntity(string departmentName, string remark) { int maxID = Convert.ToInt32(ExecuteScalar("SELECT CASE WHEN MAX(DEPARTMENTID) IS NULL THEN 0 ELSE MAX(DEPARTMENTID) END FROM AS_BI_DEPARTMENT")) + 1; SqlCreate sqlCreate = new SqlCreate("AS_BI_DEPARTMENT", SqlType.INSERT); sqlCreate.AppendQuote("DEPARTMENTID", maxID.ToString().PadLeft(5, '0')); sqlCreate.AppendQuote("DEPARTMENTNAME", departmentName); sqlCreate.AppendQuote("REMARK", remark); ExecuteNonQuery(sqlCreate.GetSQL()); }
public void UpdateEntity(Dictionary <string, string> parameters) { foreach (string key in parameters.Keys) { SqlCreate sqlCreate = new SqlCreate("AS_SYS_PARAMETER", SqlType.UPDATE); sqlCreate.AppendQuote("PARAMETERVALUE", parameters[key]); sqlCreate.AppendWhereQuote("PARAMETERNAME", key); ExecuteNonQuery(sqlCreate.GetSQL()); } }
public void UpdateEntity(string cigaretteCode, string cigaretteName, string isAbnormity, string barcode) { SqlCreate sqlCreate = new SqlCreate("AS_BI_CIGARETTE", SqlType.UPDATE); sqlCreate.AppendQuote("CIGARETTENAME", cigaretteName); sqlCreate.AppendQuote("ISABNORMITY", isAbnormity); sqlCreate.AppendQuote("BARCODE", barcode); sqlCreate.AppendWhereQuote("CIGARETTECODE", cigaretteCode); ExecuteNonQuery(sqlCreate.GetSQL()); }
//zys_2011-10-06 public void UpdateStockOutIdToStockIn(DataTable table) { DataRow[] stockInRows = table.Select(string.Format("STOCKINID IS NOT NULL AND STOCKOUTID <> 0 "), "STOCKINID"); foreach (DataRow row in stockInRows) { SqlCreate sqlCreate = new SqlCreate("AS_STOCK_IN", SqlType.UPDATE); sqlCreate.AppendQuote("STOCKOUTID", row["STOCKOUTID"]); sqlCreate.AppendWhere("STOCKINID", row["STOCKINID"]); ExecuteNonQuery(sqlCreate.GetSQL()); } }
//zys_2011-10-06 public void UpdateStatus(DataTable table) { DataRow[] stockOutRows = table.Select(string.Format("STATE = '1'"), "STOCKOUTID"); foreach (DataRow row in stockOutRows) { SqlCreate sqlCreate = new SqlCreate("AS_STOCK_OUT", SqlType.UPDATE); sqlCreate.AppendQuote("STATE", "1"); sqlCreate.AppendWhere("STOCKOUTID", row["STOCKOUTID"]); ExecuteNonQuery(sqlCreate.GetSQL()); } }
public void UpdateEntity(string employeeCode, string employeeName, string departmentID, string status, string remark) { SqlCreate sqlCreate = new SqlCreate("AS_BI_EMPLOYEE", SqlType.UPDATE); sqlCreate.AppendQuote("EMPLOYEECODE", employeeCode); sqlCreate.AppendQuote("EMPLOYEENAME", employeeName); sqlCreate.AppendQuote("DEPARTMENTID", departmentID); sqlCreate.AppendQuote("STATUS", status); sqlCreate.AppendQuote("REMARK", remark); sqlCreate.AppendWhereQuote("EMPLOYEECODE", employeeCode); ExecuteNonQuery(sqlCreate.GetSQL()); }
public void InsertEntity(DataSet dataSet) { foreach (DataRow dataRow in dataSet.Tables["AS_SYS_BARCODE"].Rows) { if (dataRow.RowState == DataRowState.Added) { SqlCreate sqlCreate = new SqlCreate("AS_SYS_BARCODE", SqlType.UPDATE); sqlCreate.AppendQuote("CIGARETTECODE", dataRow["CIGARETTECODE"]); ExecuteNonQuery(sqlCreate.GetSQL()); } } }
/// <summary> /// 2010-11-21 /// </summary> /// <param name="channelTable"></param> public void UpdateChannel(DataTable channelTable) { foreach (DataRow row in channelTable.Rows) { SqlCreate sqlCreate = new SqlCreate("AS_BI_STOCKCHANNEL", SqlType.UPDATE); sqlCreate.AppendQuote("CIGARETTECODE", row["CIGARETTECODE"]); sqlCreate.AppendQuote("CIGARETTENAME", row["CIGARETTENAME"]); sqlCreate.Append("QUANTITY", row["QUANTITY"]); sqlCreate.AppendWhereQuote("CHANNELCODE", row["CHANNELCODE"]); ExecuteNonQuery(sqlCreate.GetSQL()); } }
public void UpdateEntity(string channelCode, string cigaretteCode, string cigaretteName, int quantity, string status, string isStockIn) { SqlCreate sqlCreate = new SqlCreate("AS_BI_STOCKCHANNEL", SqlType.UPDATE); sqlCreate.AppendQuote("CIGARETTECODE", cigaretteCode.Trim()); sqlCreate.AppendQuote("CIGARETTENAME", cigaretteName.Trim()); sqlCreate.AppendQuote("REMAINQUANTITY", quantity); sqlCreate.AppendQuote("STATUS", status); sqlCreate.AppendQuote("ISSTOCKIN", isStockIn); sqlCreate.AppendWhereQuote("CHANNELCODE", channelCode); ExecuteNonQuery(sqlCreate.GetSQL()); }
public void UpdateEntity(DataSet dataSet) { foreach (DataRow dataRow in dataSet.Tables["AS_SYS_BARCODE"].Rows) { if (dataRow.RowState == DataRowState.Modified) { SqlCreate sqlCreate = new SqlCreate("AS_BI_CHANNEL", SqlType.UPDATE); sqlCreate.AppendQuote("CIGARETTECODE", dataRow["CIGARETTECODE"]); sqlCreate.AppendWhereQuote("CHANNELID", dataRow["CHANNELID", DataRowVersion.Original]); ExecuteNonQuery(sqlCreate.GetSQL()); } } }
public void Insert(int stockInID, int batchNo, string channelCode, string cigaretteCode, string cigaretteName, string barode, string state) { SqlCreate sqlCreate = new SqlCreate("AS_STOCK_IN", SqlType.INSERT); sqlCreate.Append("STOCKINID", stockInID); sqlCreate.Append("BATCHNO", batchNo); sqlCreate.AppendQuote("CHANNELCODE", channelCode); sqlCreate.AppendQuote("CIGARETTECODE", cigaretteCode); sqlCreate.AppendQuote("CIGARETTENAME", cigaretteName); sqlCreate.AppendQuote("BARCODE", barode); sqlCreate.AppendQuote("STATE", state); ExecuteNonQuery(sqlCreate.GetSQL()); }
public void InsertEntity(DataSet dataSet) { foreach (DataRow dataRow in dataSet.Tables[0].Rows) { if (dataRow.RowState == DataRowState.Added) { SqlCreate sqlCreate = new SqlCreate("sys_GroupList", SqlType.INSERT); sqlCreate.AppendQuote("GroupName", dataRow["GroupName"]); sqlCreate.AppendQuote("Memo", dataRow["Memo"].ToString().Replace("\'", "\''")); ExecuteNonQuery(sqlCreate.GetSQL()); } } }
public void InsertEntity(string employeeCode, string employeeName, string departmentID, string status, string remark) { int maxID = Convert.ToInt32(ExecuteScalar("SELECT CASE WHEN MAX(EMPLOYEEID) IS NULL THEN 0 ELSE MAX(EMPLOYEEID) END FROM AS_BI_EMPLOYEE")) + 1; SqlCreate sqlCreate = new SqlCreate("AS_BI_EMPLOYEE", SqlType.INSERT); sqlCreate.AppendQuote("EMPLOYEEID", maxID.ToString().PadLeft(5, '0')); sqlCreate.AppendQuote("EMPLOYEECODE", employeeCode); sqlCreate.AppendQuote("EMPLOYEENAME", employeeName); sqlCreate.AppendQuote("DEPARTMENTID", departmentID); sqlCreate.AppendQuote("STATUS", status); sqlCreate.AppendQuote("REMARK", remark); ExecuteNonQuery(sqlCreate.GetSQL()); }
/// <summary> /// 2010-11-21 /// </summary> /// <param name="mixTable"></param> public void InsertMixChannel(DataTable mixTable) { foreach (DataRow row in mixTable.Rows) { SqlCreate sqlCreate = new SqlCreate("AS_SC_STOCKMIXCHANNEL", SqlType.INSERT); sqlCreate.AppendQuote("ORDERDATE", row["ORDERDATE"]); sqlCreate.Append("BATCHNO", row["BATCHNO"]); sqlCreate.AppendQuote("CHANNELCODE", row["CHANNELCODE"]); sqlCreate.AppendQuote("CIGARETTECODE", row["CIGARETTECODE"]); sqlCreate.AppendQuote("CIGARETTENAME", row["CIGARETTENAME"]); ExecuteNonQuery(sqlCreate.GetSQL()); } }
/// <summary> /// 2010-11-19 /// </summary> /// <param name="lineTable"></param> public void SaveLineSchedule(DataTable lineTable) { foreach (DataRow lineRow in lineTable.Rows) { SqlCreate sqlCreate = new SqlCreate("AS_SC_LINE", SqlType.INSERT); sqlCreate.AppendQuote("LINECODE", lineRow["LINECODE"]); sqlCreate.AppendQuote("ROUTECODE", lineRow["ROUTECODE"]); sqlCreate.Append("QUANTITY", lineRow["QUANTITY"]); sqlCreate.AppendQuote("BATCHNO", lineRow["BATCHNO"]); sqlCreate.AppendQuote("ORDERDATE", lineRow["ORDERDATE"]); string sql = sqlCreate.GetSQL(); ExecuteNonQuery(sql); } }
//zys_2011-10-06 internal void InsertBatch(int batchNo, string lineCode, string channelGroup, string channelType, int sortNo, int quantity) { SqlCreate sqlCreate = new SqlCreate("AS_STOCK_OUT_BATCH", SqlType.INSERT); sqlCreate.Append("BATCHNO", batchNo); sqlCreate.AppendQuote("LINECODE", lineCode); sqlCreate.Append("CHANNELGROUP", channelGroup); sqlCreate.Append("CHANNELTYPE", channelType); sqlCreate.Append("SORTNO", sortNo); sqlCreate.Append("QUANTITY", quantity); sqlCreate.Append("OUTQUANTITY", 0); string sql = sqlCreate.GetSQL(); ExecuteNonQuery(sql); }
public void InsertEntity(DataSet dataSet) { foreach (DataRow dataRow in dataSet.Tables[0].Rows) { if (dataRow.RowState == DataRowState.Added) { SqlCreate sqlCreate = new SqlCreate("SYS_USERLIST", SqlType.INSERT); sqlCreate.AppendQuote("USERNAME", dataRow["USERNAME"]); sqlCreate.AppendQuote("USERPASSWORD", dataRow["USERPASSWORD"]); sqlCreate.AppendQuote("EMPLOYEECODE", dataRow["EMPLOYEECODE"]); sqlCreate.AppendQuote("MEMO", dataRow["MEMO"].ToString().Replace("\'", "\''")); ExecuteNonQuery(sqlCreate.GetSQL()); } } }
public void InsertEntity(string orderDate, int batchNo) { DateTime SCDATE = DateTime.Parse(orderDate); SqlCreate sqlCreate = new SqlCreate("AS_BI_BATCH", SqlType.INSERT); sqlCreate.Append("BATCHNO", batchNo); sqlCreate.AppendQuote("BATCHNAME", string.Format("{0}第{1}批次", orderDate, batchNo)); sqlCreate.AppendQuote("ORDERDATE", orderDate); sqlCreate.AppendQuote("ISVALID", 0); sqlCreate.AppendQuote("EXECUTEUSER", 0); sqlCreate.AppendQuote("EXECUTEIP", 0); sqlCreate.AppendQuote("ISUPTONOONEPRO", 0); sqlCreate.AppendQuote("SCDATE", DateTime.Now.ToShortDateString()); ExecuteNonQuery(sqlCreate.GetSQL()); }