예제 #1
0
        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());                
            }
        }
 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());
 }
예제 #3
0
        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());
            }
        }
예제 #4
0
        /// <summary>
        /// 2010-11-21
        /// </summary>
        /// <param name="supplyTable"></param>
        /// <param name="orderDate"></param>
        /// <param name="lineCode"></param>
        public void InsertSupply(DataTable supplyTable, string orderDate, string lineCode)
        {
            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 ORDERDATE='{0}' AND LINECODE='{1}'", orderDate, lineCode);
                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.AppendQuote("LINECODE", row["LINECODE"]);
                sqlCreate.Append("SORTNO", row["SORTNO"]);

                sqlCreate.Append("SERIALNO", serialNo++);                
                sqlCreate.Append("ORIGINALSORTNO", 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());
            }
        }
예제 #5
0
        /// <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());
            }
        }
예제 #6
0
 /// <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());
 }
예제 #7
0
 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());
 }
예제 #8
0
 /// <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());
 }
예제 #10
0
 internal void Update(string cigaretteCode, string classSymbol, string cigaretteName)
 {
     SqlCreate sqlCreate = new SqlCreate("CIGARETTE", SqlType.UPDATE);
     sqlCreate.AppendQuote("CIGARETTENAME", cigaretteName);
     sqlCreate.AppendQuote("CLASS", classSymbol);
     sqlCreate.AppendWhereQuote("CIGARETTECODE", cigaretteCode);
     ExecuteNonQuery(sqlCreate.GetSQL());
 }
예제 #11
0
파일: UnitDao.cs 프로젝트: SaintLoong/PFK
 public void InsertUnit(DataRow row)
 {
     SqlCreate sqlCreate = new SqlCreate("UNIT", SqlType.INSERT);
     sqlCreate.AppendQuote("UNITCODE", row["UNITCODE"]);
     sqlCreate.AppendQuote("UNITNAME", row["UNITNAME"]);
     sqlCreate.AppendQuote("UNITCLASS", row["UNITCLASS"]);
     sqlCreate.AppendQuote("MEMO", row["MEMO"]);
     ExecuteNonQuery(sqlCreate.GetSQL());
 }
예제 #12
0
 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());
 }
예제 #13
0
 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());
 }
예제 #14
0
파일: AreaDao.cs 프로젝트: SaintLoong/PFK
 public void Insert(DataRow row)
 {
     SqlCreate sqlCreate = new SqlCreate("AREA", SqlType.INSERT);
     sqlCreate.AppendQuote("AREACODE", row["AREACODE"]);
     sqlCreate.AppendQuote("AREANAME", row["AREANAME"]);
     sqlCreate.AppendQuote("WAREHOUSECODE", row["WAREHOUSECODE"]);
     sqlCreate.AppendQuote("MEMO", row["MEMO"]);
     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());
     }
 }
예제 #16
0
파일: AreaDao.cs 프로젝트: SaintLoong/PFK
        public void Update(DataRow row)
        {
            SqlCreate sqlCreate = new SqlCreate("AREA", SqlType.UPDATE);

            sqlCreate.AppendQuote("AREANAME", row["AREANAME"]);
            sqlCreate.AppendQuote("MEMO", row["MEMO"]);
            sqlCreate.AppendWhereQuote("AREACODE", row["AREACODE"]);
            string sql = sqlCreate.GetSQL();
            ExecuteNonQuery(sql);
        }
 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());
 }
예제 #18
0
 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());
 }
예제 #19
0
 public void Insert(string billCode, string billName, int billType, int taskLevel, string memo)
 {
     SqlCreate sqlCreate = new SqlCreate("BILLTYPE", SqlType.INSERT);
     sqlCreate.AppendQuote("BILLCODE", billCode);
     sqlCreate.AppendQuote("BILLNAME", billName);
     sqlCreate.AppendQuote("BTYPE", billType);
     sqlCreate.Append("TASKLEVEL", taskLevel);
     sqlCreate.AppendQuote("CANDELETE", "1");
     sqlCreate.AppendQuote("MEMO", memo);
     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());
         }
     }
 }
예제 #21
0
 public void InserMaster(string formulaCode, string formulaName, string formulaDate, string cigaretteName, string quantity, string formulaNo, string operater)
 {
     SqlCreate sqlCreate = new SqlCreate("FORMULAMASTER", SqlType.INSERT);
     sqlCreate.AppendQuote("FORMULACODE", formulaCode);
     sqlCreate.AppendQuote("FORMULANAME", formulaName);
     sqlCreate.Append("FORMULADATE", string.Format("TO_DATE('{0}','YYYY-MM-DD')", formulaDate));
     sqlCreate.AppendQuote("CIGARETTENAME", THOKUtil.ToDBC(cigaretteName));
     sqlCreate.Append("USECOUNT", quantity);
     sqlCreate.Append("FORMULANO", formulaNo);
     sqlCreate.AppendQuote("OPERATER", operater);
     ExecuteNonQuery(sqlCreate.GetSQL());
 }
예제 #22
0
파일: ShelfDao.cs 프로젝트: SaintLoong/PFK
        public void Update(DataRow row)
        {
            SqlCreate sqlCreate = new SqlCreate("SHELF", SqlType.UPDATE);

            sqlCreate.AppendQuote("SHELFNAME", row["SHELFNAME"]);
            sqlCreate.Append("SHELFCOLUMN", row["SHELFCOLUMN"]);
            sqlCreate.Append("SHELFROW", row["SHELFROW"]);
            sqlCreate.AppendQuote("CRANENO", row["CRANENO"]);
            sqlCreate.AppendQuote("MEMO", row["MEMO"]);
            sqlCreate.AppendWhereQuote("SHELFCODE", row["SHELFCODE"]);
            ExecuteNonQuery(sqlCreate.GetSQL());
        }
예제 #23
0
        public void Update(string billCode, string billName, int billType, int taskLevel, string memo)
        {
            SqlCreate sqlCreate = new SqlCreate("BILLTYPE", SqlType.UPDATE);

            sqlCreate.AppendQuote("BILLNAME", billName);
            sqlCreate.AppendQuote("BTYPE", billType);
            sqlCreate.Append("TASKLEVEL", taskLevel);
            sqlCreate.AppendQuote("MEMO", memo);
            sqlCreate.AppendWhereQuote("BILLCODE", billCode);

            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());
     }
 }
예제 #25
0
 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());
 }
예제 #26
0
파일: ShelfDao.cs 프로젝트: SaintLoong/PFK
 public void Insert(DataRow row)
 {
     SqlCreate sqlCreate = new SqlCreate("SHELF", SqlType.INSERT);
     sqlCreate.AppendQuote("SHELFCODE", row["SHELFCODE"]);
     sqlCreate.AppendQuote("SHELFNAME", row["SHELFNAME"]);
     sqlCreate.Append("SHELFCOLUMN", row["SHELFCOLUMN"]);
     sqlCreate.Append("SHELFROW", row["SHELFROW"]);
     sqlCreate.AppendQuote("WAREHOUSECODE", row["WAREHOUSECODE"]);
     sqlCreate.AppendQuote("AREACODE", row["AREACODE"]);
     sqlCreate.AppendQuote("CRANENO", row["CRANENO"]);
     sqlCreate.AppendQuote("MEMO", row["MEMO"]);
     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());
         }
     }
 }
 /// <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);
     }
 }
예제 #29
0
 public void Update(string productCode, string original, string years, string grade, string style)
 {
     SqlCreate sqlCreate = new SqlCreate("PRODUCT", SqlType.UPDATE);
     if (style == "其他")
         sqlCreate.AppendQuote("PRODUCTNAME", "其他");
     else
         sqlCreate.AppendQuote("PRODUCTNAME", grade + original + years + style);
     sqlCreate.AppendQuote("ORIGINAL", original);
     sqlCreate.AppendQuote("YEARS", years);
     sqlCreate.AppendQuote("GRADE", THOKUtil.ToDBC(grade));
     sqlCreate.AppendQuote("STYLE", style);
     sqlCreate.AppendWhereQuote("PRODUCTCODE", THOKUtil.ToDBC(productCode.Trim()));
     ExecuteNonQuery(sqlCreate.GetSQL());
 }
예제 #30
0
파일: PalletDao.cs 프로젝트: SaintLoong/PFK
 internal void InsertMaster(DataRow masterRow, string userID)
 {
     SqlCreate sqlCreate = new SqlCreate("PALLETMASTER", SqlType.INSERT);
     sqlCreate.AppendQuote("BILLNO", masterRow["BILLNO"]);
     sqlCreate.Append("BILLDATE", string.Format("TO_DATE('{0}', 'YYYY-MM-DD')", masterRow["BILLDATE"]));
     sqlCreate.AppendQuote("BILLTYPE", masterRow["BILLTYPE"]);
     sqlCreate.AppendQuote("WAREHOUSECODE", masterRow["WAREHOUSECODE"]);
     sqlCreate.AppendQuote("TARGET", masterRow["TARGET"]);
     sqlCreate.AppendQuote("STATUS", masterRow["STATUS"]);
     sqlCreate.AppendQuote("STATE", masterRow["STATE"]);
     sqlCreate.AppendQuote("OPERATER", userID);
     sqlCreate.Append("OPERATEDATE", "SYSDATE");
     ExecuteNonQuery(sqlCreate.GetSQL());
 }