Example #1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(WMS_Database.WH_CellModel model)
        {
            StringBuilder strSql  = new StringBuilder();
            StringBuilder strSql1 = new StringBuilder();
            StringBuilder strSql2 = new StringBuilder();

            if (model.Cell_ID != null)
            {
                strSql1.Append("Cell_ID,");
                strSql2.Append("'" + model.Cell_ID + "',");
            }
            if (model.Area_ID != null)
            {
                strSql1.Append("Area_ID,");
                strSql2.Append("'" + model.Area_ID + "',");
            }
            if (model.Cell_Code != null)
            {
                strSql1.Append("Cell_Code,");
                strSql2.Append("'" + model.Cell_Code + "',");
            }
            if (model.Cell_Name != null)
            {
                strSql1.Append("Cell_Name,");
                strSql2.Append("'" + model.Cell_Name + "',");
            }
            if (model.Cell_Lane != null)
            {
                strSql1.Append("Cell_Lane,");
                strSql2.Append("'" + model.Cell_Lane + "',");
            }
            if (model.Device_Code != null)
            {
                strSql1.Append("Device_Code,");
                strSql2.Append("'" + model.Device_Code + "',");
            }
            if (model.Shelf_Type != null)
            {
                strSql1.Append("Shelf_Type,");
                strSql2.Append("'" + model.Shelf_Type + "',");
            }
            if (model.Cell_InOut != null)
            {
                strSql1.Append("Cell_InOut,");
                strSql2.Append("'" + model.Cell_InOut + "',");
            }
            if (model.Cell_Type != null)
            {
                strSql1.Append("Cell_Type,");
                strSql2.Append("'" + model.Cell_Type + "',");
            }
            if (model.Cell_Storage_Type != null)
            {
                strSql1.Append("Cell_Storage_Type,");
                strSql2.Append("'" + model.Cell_Storage_Type + "',");
            }
            if (model.Cell_Fork_Type != null)
            {
                strSql1.Append("Cell_Fork_Type,");
                strSql2.Append("'" + model.Cell_Fork_Type + "',");
            }
            if (model.Cell_Layer != null)
            {
                strSql1.Append("Cell_Layer,");
                strSql2.Append("" + model.Cell_Layer + ",");
            }
            if (model.Cell_Column != null)
            {
                strSql1.Append("Cell_Column,");
                strSql2.Append("" + model.Cell_Column + ",");
            }
            if (model.Cell_Row != null)
            {
                strSql1.Append("Cell_Row,");
                strSql2.Append("" + model.Cell_Row + ",");
            }
            if (model.Cell_Reserve1 != null)
            {
                strSql1.Append("Cell_Reserve1,");
                strSql2.Append("'" + model.Cell_Reserve1 + "',");
            }
            if (model.Cell_Reserve2 != null)
            {
                strSql1.Append("Cell_Reserve2,");
                strSql2.Append("'" + model.Cell_Reserve2 + "',");
            }
            if (model.Cell_Reserve3 != null)
            {
                strSql1.Append("Cell_Reserve3,");
                strSql2.Append("'" + model.Cell_Reserve3 + "',");
            }
            if (model.Cell_Reserve4 != null)
            {
                strSql1.Append("Cell_Reserve4,");
                strSql2.Append("'" + model.Cell_Reserve4 + "',");
            }
            if (model.Cell_Reserve5 != null)
            {
                strSql1.Append("Cell_Reserve5,");
                strSql2.Append("'" + model.Cell_Reserve5 + "',");
            }
            strSql.Append("insert into WH_Cell(");
            strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1));
            strSql.Append(")");
            strSql.Append(" values (");
            strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1));
            strSql.Append(")");
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #2
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(WMS_Database.ControlModel model)
        {
            StringBuilder strSql  = new StringBuilder();
            StringBuilder strSql1 = new StringBuilder();
            StringBuilder strSql2 = new StringBuilder();

            if (model.Contorl_ID != null)
            {
                strSql1.Append("Contorl_ID,");
                strSql2.Append("'" + model.Contorl_ID + "',");
            }
            if (model.Manage_ID != null)
            {
                strSql1.Append("Manage_ID,");
                strSql2.Append("'" + model.Manage_ID + "',");
            }
            if (model.Contorl_Tray_Barcode != null)
            {
                strSql1.Append("Contorl_Tray_Barcode,");
                strSql2.Append("'" + model.Contorl_Tray_Barcode + "',");
            }
            if (model.Control_Task_Type != null)
            {
                strSql1.Append("Control_Task_Type,");
                strSql2.Append("'" + model.Control_Task_Type + "',");
            }
            if (model.Control_Task_Priority != null)
            {
                strSql1.Append("Control_Task_Priority,");
                strSql2.Append("'" + model.Control_Task_Priority + "',");
            }
            if (model.Control_Start_WH_Code != null)
            {
                strSql1.Append("Control_Start_WH_Code,");
                strSql2.Append("'" + model.Control_Start_WH_Code + "',");
            }
            if (model.Control_Start_Device_Code != null)
            {
                strSql1.Append("Control_Start_Device_Code,");
                strSql2.Append("'" + model.Control_Start_Device_Code + "',");
            }
            if (model.Control_End_WH_Code != null)
            {
                strSql1.Append("Control_End_WH_Code,");
                strSql2.Append("'" + model.Control_End_WH_Code + "',");
            }
            if (model.Control_End_Device_Code != null)
            {
                strSql1.Append("Control_End_Device_Code,");
                strSql2.Append("'" + model.Control_End_Device_Code + "',");
            }
            if (model.Control_Params != null)
            {
                strSql1.Append("Control_Params,");
                strSql2.Append("'" + model.Control_Params + "',");
            }
            if (model.Control_Phase != null)
            {
                strSql1.Append("Control_Phase,");
                strSql2.Append("" + model.Control_Phase + ",");
            }
            if (model.Control_Status != null)
            {
                strSql1.Append("Control_Status,");
                strSql2.Append("'" + model.Control_Status + "',");
            }
            if (model.Control_Error_Text != null)
            {
                strSql1.Append("Control_Error_Text,");
                strSql2.Append("'" + model.Control_Error_Text + "',");
            }
            if (model.Control_Begin_Time != null)
            {
                strSql1.Append("Control_Begin_Time,");
                strSql2.Append("'" + model.Control_Begin_Time + "',");
            }
            if (model.Contorl_End_Time != null)
            {
                strSql1.Append("Contorl_End_Time,");
                strSql2.Append("'" + model.Contorl_End_Time + "',");
            }
            if (model.Control_Remark != null)
            {
                strSql1.Append("Control_Remark,");
                strSql2.Append("'" + model.Control_Remark + "',");
            }
            if (model.Control_Reserve1 != null)
            {
                strSql1.Append("Control_Reserve1,");
                strSql2.Append("'" + model.Control_Reserve1 + "',");
            }
            if (model.Control_Reserve2 != null)
            {
                strSql1.Append("Control_Reserve2,");
                strSql2.Append("'" + model.Control_Reserve2 + "',");
            }
            if (model.Control_Reserve3 != null)
            {
                strSql1.Append("Control_Reserve3,");
                strSql2.Append("'" + model.Control_Reserve3 + "',");
            }
            if (model.Control_Reserve4 != null)
            {
                strSql1.Append("Control_Reserve4,");
                strSql2.Append("'" + model.Control_Reserve4 + "',");
            }
            if (model.Control_Reserve5 != null)
            {
                strSql1.Append("Control_Reserve5,");
                strSql2.Append("'" + model.Control_Reserve5 + "',");
            }
            strSql.Append("insert into Control(");
            strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1));
            strSql.Append(")");
            strSql.Append(" values (");
            strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1));
            strSql.Append(")");
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #3
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(WMS_Database.WH_CellModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update WH_Cell set ");
            if (model.Area_ID != null)
            {
                strSql.Append("Area_ID='" + model.Area_ID + "',");
            }
            else
            {
                strSql.Append("Area_ID= null ,");
            }
            if (model.Cell_Code != null)
            {
                strSql.Append("Cell_Code='" + model.Cell_Code + "',");
            }
            else
            {
                strSql.Append("Cell_Code= null ,");
            }
            if (model.Cell_Name != null)
            {
                strSql.Append("Cell_Name='" + model.Cell_Name + "',");
            }
            else
            {
                strSql.Append("Cell_Name= null ,");
            }
            if (model.Cell_Lane != null)
            {
                strSql.Append("Cell_Lane='" + model.Cell_Lane + "',");
            }
            else
            {
                strSql.Append("Cell_Lane= null ,");
            }
            if (model.Device_Code != null)
            {
                strSql.Append("Device_Code='" + model.Device_Code + "',");
            }
            else
            {
                strSql.Append("Device_Code= null ,");
            }
            if (model.Shelf_Type != null)
            {
                strSql.Append("Shelf_Type='" + model.Shelf_Type + "',");
            }
            else
            {
                strSql.Append("Shelf_Type= null ,");
            }
            if (model.Cell_InOut != null)
            {
                strSql.Append("Cell_InOut='" + model.Cell_InOut + "',");
            }
            else
            {
                strSql.Append("Cell_InOut= null ,");
            }
            if (model.Cell_Type != null)
            {
                strSql.Append("Cell_Type='" + model.Cell_Type + "',");
            }
            else
            {
                strSql.Append("Cell_Type= null ,");
            }
            if (model.Cell_Storage_Type != null)
            {
                strSql.Append("Cell_Storage_Type='" + model.Cell_Storage_Type + "',");
            }
            else
            {
                strSql.Append("Cell_Storage_Type= null ,");
            }
            if (model.Cell_Fork_Type != null)
            {
                strSql.Append("Cell_Fork_Type='" + model.Cell_Fork_Type + "',");
            }
            else
            {
                strSql.Append("Cell_Fork_Type= null ,");
            }
            if (model.Cell_Layer != null)
            {
                strSql.Append("Cell_Layer=" + model.Cell_Layer + ",");
            }
            else
            {
                strSql.Append("Cell_Layer= null ,");
            }
            if (model.Cell_Column != null)
            {
                strSql.Append("Cell_Column=" + model.Cell_Column + ",");
            }
            else
            {
                strSql.Append("Cell_Column= null ,");
            }
            if (model.Cell_Row != null)
            {
                strSql.Append("Cell_Row=" + model.Cell_Row + ",");
            }
            else
            {
                strSql.Append("Cell_Row= null ,");
            }
            if (model.Cell_Reserve1 != null)
            {
                strSql.Append("Cell_Reserve1='" + model.Cell_Reserve1 + "',");
            }
            else
            {
                strSql.Append("Cell_Reserve1= null ,");
            }
            if (model.Cell_Reserve2 != null)
            {
                strSql.Append("Cell_Reserve2='" + model.Cell_Reserve2 + "',");
            }
            else
            {
                strSql.Append("Cell_Reserve2= null ,");
            }
            if (model.Cell_Reserve3 != null)
            {
                strSql.Append("Cell_Reserve3='" + model.Cell_Reserve3 + "',");
            }
            else
            {
                strSql.Append("Cell_Reserve3= null ,");
            }
            if (model.Cell_Reserve4 != null)
            {
                strSql.Append("Cell_Reserve4='" + model.Cell_Reserve4 + "',");
            }
            else
            {
                strSql.Append("Cell_Reserve4= null ,");
            }
            if (model.Cell_Reserve5 != null)
            {
                strSql.Append("Cell_Reserve5='" + model.Cell_Reserve5 + "',");
            }
            else
            {
                strSql.Append("Cell_Reserve5= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where Cell_ID='" + model.Cell_ID + "' ");
            int rowsAffected = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #4
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(WMS_Database.View_Manage_ListModel model)
        {
            StringBuilder strSql  = new StringBuilder();
            StringBuilder strSql1 = new StringBuilder();
            StringBuilder strSql2 = new StringBuilder();

            if (model.Plan_ID != null)
            {
                strSql1.Append("Plan_ID,");
                strSql2.Append("'" + model.Plan_ID + "',");
            }
            if (model.Mange_Type_ID != null)
            {
                strSql1.Append("Mange_Type_ID,");
                strSql2.Append("'" + model.Mange_Type_ID + "',");
            }
            if (model.Mange_Stock_Barcode != null)
            {
                strSql1.Append("Mange_Stock_Barcode,");
                strSql2.Append("'" + model.Mange_Stock_Barcode + "',");
            }
            if (model.Mange_Status != null)
            {
                strSql1.Append("Mange_Status,");
                strSql2.Append("'" + model.Mange_Status + "',");
            }
            if (model.Mange_Full_Flag != null)
            {
                strSql1.Append("Mange_Full_Flag,");
                strSql2.Append("'" + model.Mange_Full_Flag + "',");
            }
            if (model.Manage_BreakDown_Status != null)
            {
                strSql1.Append("Manage_BreakDown_Status,");
                strSql2.Append("'" + model.Manage_BreakDown_Status + "',");
            }
            if (model.Mange_Start_Cell_ID != null)
            {
                strSql1.Append("Mange_Start_Cell_ID,");
                strSql2.Append("'" + model.Mange_Start_Cell_ID + "',");
            }
            if (model.Mange_End_Cell_ID != null)
            {
                strSql1.Append("Mange_End_Cell_ID,");
                strSql2.Append("'" + model.Mange_End_Cell_ID + "',");
            }
            if (model.Manage_Operater != null)
            {
                strSql1.Append("Manage_Operater,");
                strSql2.Append("'" + model.Manage_Operater + "',");
            }
            if (model.Manage_Begin_Time != null)
            {
                strSql1.Append("Manage_Begin_Time,");
                strSql2.Append("'" + model.Manage_Begin_Time + "',");
            }
            if (model.Manage_End_Time != null)
            {
                strSql1.Append("Manage_End_Time,");
                strSql2.Append("'" + model.Manage_End_Time + "',");
            }
            if (model.Manage_List_ID != null)
            {
                strSql1.Append("Manage_List_ID,");
                strSql2.Append("'" + model.Manage_List_ID + "',");
            }
            if (model.Stock_List_ID != null)
            {
                strSql1.Append("Stock_List_ID,");
                strSql2.Append("'" + model.Stock_List_ID + "',");
            }
            if (model.Manage_List_Quantity != null)
            {
                strSql1.Append("Manage_List_Quantity,");
                strSql2.Append("'" + model.Manage_List_Quantity + "',");
            }
            if (model.Manage_List_Remark != null)
            {
                strSql1.Append("Manage_List_Remark,");
                strSql2.Append("'" + model.Manage_List_Remark + "',");
            }
            if (model.Manage_Type_Code != null)
            {
                strSql1.Append("Manage_Type_Code,");
                strSql2.Append("'" + model.Manage_Type_Code + "',");
            }
            if (model.Manage_Type_Name != null)
            {
                strSql1.Append("Manage_Type_Name,");
                strSql2.Append("'" + model.Manage_Type_Name + "',");
            }
            if (model.Manage_Type_Group != null)
            {
                strSql1.Append("Manage_Type_Group,");
                strSql2.Append("'" + model.Manage_Type_Group + "',");
            }
            if (model.Manage_Type_Remark != null)
            {
                strSql1.Append("Manage_Type_Remark,");
                strSql2.Append("'" + model.Manage_Type_Remark + "',");
            }
            if (model.Manage_Type_InOut != null)
            {
                strSql1.Append("Manage_Type_InOut,");
                strSql2.Append("'" + model.Manage_Type_InOut + "',");
            }
            if (model.Mange_ID != null)
            {
                strSql1.Append("Mange_ID,");
                strSql2.Append("'" + model.Mange_ID + "',");
            }
            if (model.Mange_CreateTime != null)
            {
                strSql1.Append("Mange_CreateTime,");
                strSql2.Append("'" + model.Mange_CreateTime + "',");
            }
            strSql.Append("insert into View_Manage_List(");
            strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1));
            strSql.Append(")");
            strSql.Append(" values (");
            strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1));
            strSql.Append(")");
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #5
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(WMS_Database.ControlModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update Control set ");
            if (model.Manage_ID != null)
            {
                strSql.Append("Manage_ID='" + model.Manage_ID + "',");
            }
            if (model.Contorl_Tray_Barcode != null)
            {
                strSql.Append("Contorl_Tray_Barcode='" + model.Contorl_Tray_Barcode + "',");
            }
            else
            {
                strSql.Append("Contorl_Tray_Barcode= null ,");
            }
            if (model.Control_Task_Type != null)
            {
                strSql.Append("Control_Task_Type='" + model.Control_Task_Type + "',");
            }
            if (model.Control_Task_Priority != null)
            {
                strSql.Append("Control_Task_Priority='" + model.Control_Task_Priority + "',");
            }
            else
            {
                strSql.Append("Control_Task_Priority= null ,");
            }
            if (model.Control_Start_WH_Code != null)
            {
                strSql.Append("Control_Start_WH_Code='" + model.Control_Start_WH_Code + "',");
            }
            else
            {
                strSql.Append("Control_Start_WH_Code= null ,");
            }
            if (model.Control_Start_Device_Code != null)
            {
                strSql.Append("Control_Start_Device_Code='" + model.Control_Start_Device_Code + "',");
            }
            else
            {
                strSql.Append("Control_Start_Device_Code= null ,");
            }
            if (model.Control_End_WH_Code != null)
            {
                strSql.Append("Control_End_WH_Code='" + model.Control_End_WH_Code + "',");
            }
            else
            {
                strSql.Append("Control_End_WH_Code= null ,");
            }
            if (model.Control_End_Device_Code != null)
            {
                strSql.Append("Control_End_Device_Code='" + model.Control_End_Device_Code + "',");
            }
            else
            {
                strSql.Append("Control_End_Device_Code= null ,");
            }
            if (model.Control_Params != null)
            {
                strSql.Append("Control_Params='" + model.Control_Params + "',");
            }
            else
            {
                strSql.Append("Control_Params= null ,");
            }
            if (model.Control_Phase != null)
            {
                strSql.Append("Control_Phase=" + model.Control_Phase + ",");
            }
            if (model.Control_Status != null)
            {
                strSql.Append("Control_Status='" + model.Control_Status + "',");
            }
            else
            {
                strSql.Append("Control_Status= null ,");
            }
            if (model.Control_Error_Text != null)
            {
                strSql.Append("Control_Error_Text='" + model.Control_Error_Text + "',");
            }
            else
            {
                strSql.Append("Control_Error_Text= null ,");
            }
            if (model.Control_Begin_Time != null)
            {
                strSql.Append("Control_Begin_Time='" + model.Control_Begin_Time + "',");
            }
            else
            {
                strSql.Append("Control_Begin_Time= null ,");
            }
            if (model.Contorl_End_Time != null)
            {
                strSql.Append("Contorl_End_Time='" + model.Contorl_End_Time + "',");
            }
            else
            {
                strSql.Append("Contorl_End_Time= null ,");
            }
            if (model.Control_Remark != null)
            {
                strSql.Append("Control_Remark='" + model.Control_Remark + "',");
            }
            else
            {
                strSql.Append("Control_Remark= null ,");
            }
            if (model.Control_Reserve1 != null)
            {
                strSql.Append("Control_Reserve1='" + model.Control_Reserve1 + "',");
            }
            else
            {
                strSql.Append("Control_Reserve1= null ,");
            }
            if (model.Control_Reserve2 != null)
            {
                strSql.Append("Control_Reserve2='" + model.Control_Reserve2 + "',");
            }
            else
            {
                strSql.Append("Control_Reserve2= null ,");
            }
            if (model.Control_Reserve3 != null)
            {
                strSql.Append("Control_Reserve3='" + model.Control_Reserve3 + "',");
            }
            else
            {
                strSql.Append("Control_Reserve3= null ,");
            }
            if (model.Control_Reserve4 != null)
            {
                strSql.Append("Control_Reserve4='" + model.Control_Reserve4 + "',");
            }
            else
            {
                strSql.Append("Control_Reserve4= null ,");
            }
            if (model.Control_Reserve5 != null)
            {
                strSql.Append("Control_Reserve5='" + model.Control_Reserve5 + "',");
            }
            else
            {
                strSql.Append("Control_Reserve5= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where Contorl_ID='" + model.Contorl_ID + "' ");
            int rowsAffected = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #6
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(WMS_Database.View_Manage_ListModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update View_Manage_List set ");
            if (model.Plan_ID != null)
            {
                strSql.Append("Plan_ID='" + model.Plan_ID + "',");
            }
            else
            {
                strSql.Append("Plan_ID= null ,");
            }
            if (model.Mange_Type_ID != null)
            {
                strSql.Append("Mange_Type_ID='" + model.Mange_Type_ID + "',");
            }
            else
            {
                strSql.Append("Mange_Type_ID= null ,");
            }
            if (model.Mange_Stock_Barcode != null)
            {
                strSql.Append("Mange_Stock_Barcode='" + model.Mange_Stock_Barcode + "',");
            }
            else
            {
                strSql.Append("Mange_Stock_Barcode= null ,");
            }
            if (model.Mange_Status != null)
            {
                strSql.Append("Mange_Status='" + model.Mange_Status + "',");
            }
            else
            {
                strSql.Append("Mange_Status= null ,");
            }
            if (model.Mange_Full_Flag != null)
            {
                strSql.Append("Mange_Full_Flag='" + model.Mange_Full_Flag + "',");
            }
            else
            {
                strSql.Append("Mange_Full_Flag= null ,");
            }
            if (model.Manage_BreakDown_Status != null)
            {
                strSql.Append("Manage_BreakDown_Status='" + model.Manage_BreakDown_Status + "',");
            }
            else
            {
                strSql.Append("Manage_BreakDown_Status= null ,");
            }
            if (model.Mange_Start_Cell_ID != null)
            {
                strSql.Append("Mange_Start_Cell_ID='" + model.Mange_Start_Cell_ID + "',");
            }
            else
            {
                strSql.Append("Mange_Start_Cell_ID= null ,");
            }
            if (model.Mange_End_Cell_ID != null)
            {
                strSql.Append("Mange_End_Cell_ID='" + model.Mange_End_Cell_ID + "',");
            }
            else
            {
                strSql.Append("Mange_End_Cell_ID= null ,");
            }
            if (model.Manage_Operater != null)
            {
                strSql.Append("Manage_Operater='" + model.Manage_Operater + "',");
            }
            else
            {
                strSql.Append("Manage_Operater= null ,");
            }
            if (model.Manage_Begin_Time != null)
            {
                strSql.Append("Manage_Begin_Time='" + model.Manage_Begin_Time + "',");
            }
            else
            {
                strSql.Append("Manage_Begin_Time= null ,");
            }
            if (model.Manage_End_Time != null)
            {
                strSql.Append("Manage_End_Time='" + model.Manage_End_Time + "',");
            }
            else
            {
                strSql.Append("Manage_End_Time= null ,");
            }
            if (model.Manage_List_ID != null)
            {
                strSql.Append("Manage_List_ID='" + model.Manage_List_ID + "',");
            }
            if (model.Stock_List_ID != null)
            {
                strSql.Append("Stock_List_ID='" + model.Stock_List_ID + "',");
            }
            else
            {
                strSql.Append("Stock_List_ID= null ,");
            }
            if (model.Manage_List_Quantity != null)
            {
                strSql.Append("Manage_List_Quantity='" + model.Manage_List_Quantity + "',");
            }
            else
            {
                strSql.Append("Manage_List_Quantity= null ,");
            }
            if (model.Manage_List_Remark != null)
            {
                strSql.Append("Manage_List_Remark='" + model.Manage_List_Remark + "',");
            }
            else
            {
                strSql.Append("Manage_List_Remark= null ,");
            }
            if (model.Manage_Type_Code != null)
            {
                strSql.Append("Manage_Type_Code='" + model.Manage_Type_Code + "',");
            }
            if (model.Manage_Type_Name != null)
            {
                strSql.Append("Manage_Type_Name='" + model.Manage_Type_Name + "',");
            }
            else
            {
                strSql.Append("Manage_Type_Name= null ,");
            }
            if (model.Manage_Type_Group != null)
            {
                strSql.Append("Manage_Type_Group='" + model.Manage_Type_Group + "',");
            }
            else
            {
                strSql.Append("Manage_Type_Group= null ,");
            }
            if (model.Manage_Type_Remark != null)
            {
                strSql.Append("Manage_Type_Remark='" + model.Manage_Type_Remark + "',");
            }
            else
            {
                strSql.Append("Manage_Type_Remark= null ,");
            }
            if (model.Manage_Type_InOut != null)
            {
                strSql.Append("Manage_Type_InOut='" + model.Manage_Type_InOut + "',");
            }
            else
            {
                strSql.Append("Manage_Type_InOut= null ,");
            }
            if (model.Mange_ID != null)
            {
                strSql.Append("Mange_ID='" + model.Mange_ID + "',");
            }
            if (model.Mange_CreateTime != null)
            {
                strSql.Append("Mange_CreateTime='" + model.Mange_CreateTime + "',");
            }
            else
            {
                strSql.Append("Mange_CreateTime= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where Plan_ID='" + model.Plan_ID + "' and Mange_Type_ID='" + model.Mange_Type_ID + "' and Mange_Stock_Barcode='" + model.Mange_Stock_Barcode + "' and Mange_Status='" + model.Mange_Status + "' and Mange_Full_Flag='" + model.Mange_Full_Flag + "' and Manage_BreakDown_Status='" + model.Manage_BreakDown_Status + "' and Mange_Start_Cell_ID='" + model.Mange_Start_Cell_ID + "' and Mange_End_Cell_ID='" + model.Mange_End_Cell_ID + "' and Manage_Operater='" + model.Manage_Operater + "' and Manage_Begin_Time='" + model.Manage_Begin_Time + "' and Manage_End_Time='" + model.Manage_End_Time + "' and Manage_List_ID='" + model.Manage_List_ID + "' and Stock_List_ID='" + model.Stock_List_ID + "' and Manage_List_Quantity='" + model.Manage_List_Quantity + "' and Manage_List_Remark='" + model.Manage_List_Remark + "' and Manage_Type_Code='" + model.Manage_Type_Code + "' and Manage_Type_Name='" + model.Manage_Type_Name + "' and Manage_Type_Group='" + model.Manage_Type_Group + "' and Manage_Type_Remark='" + model.Manage_Type_Remark + "' and Manage_Type_InOut='" + model.Manage_Type_InOut + "' and Mange_ID='" + model.Mange_ID + "' and Mange_CreateTime='" + model.Mange_CreateTime + "' ");
            int rowsAffected = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #7
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(WMS_Database.WH_Cell_Operate_RecordModel model)
        {
            StringBuilder strSql  = new StringBuilder();
            StringBuilder strSql1 = new StringBuilder();
            StringBuilder strSql2 = new StringBuilder();

            if (model.WH_Cell_Oper_RecID != null)
            {
                strSql1.Append("WH_Cell_Oper_RecID,");
                strSql2.Append("'" + model.WH_Cell_Oper_RecID + "',");
            }
            if (model.WareHouse_ID != null)
            {
                strSql1.Append("WareHouse_ID,");
                strSql2.Append("'" + model.WareHouse_ID + "',");
            }
            if (model.WH_Cell_Code != null)
            {
                strSql1.Append("WH_Cell_Code,");
                strSql2.Append("'" + model.WH_Cell_Code + "',");
            }
            if (model.WH_Cell_Oper_Type != null)
            {
                strSql1.Append("WH_Cell_Oper_Type,");
                strSql2.Append("'" + model.WH_Cell_Oper_Type + "',");
            }
            if (model.WH_Cell_Oper_Detail != null)
            {
                strSql1.Append("WH_Cell_Oper_Detail,");
                strSql2.Append("'" + model.WH_Cell_Oper_Detail + "',");
            }
            if (model.WH_Cell_Oper_Datetime != null)
            {
                strSql1.Append("WH_Cell_Oper_Datetime,");
                strSql2.Append("'" + model.WH_Cell_Oper_Datetime + "',");
            }
            if (model.WH_Cell_Oper_Reserve1 != null)
            {
                strSql1.Append("WH_Cell_Oper_Reserve1,");
                strSql2.Append("'" + model.WH_Cell_Oper_Reserve1 + "',");
            }
            if (model.WH_Cell_Oper_Reserve2 != null)
            {
                strSql1.Append("WH_Cell_Oper_Reserve2,");
                strSql2.Append("'" + model.WH_Cell_Oper_Reserve2 + "',");
            }
            if (model.WH_Cell_Oper_Reserve3 != null)
            {
                strSql1.Append("WH_Cell_Oper_Reserve3,");
                strSql2.Append("'" + model.WH_Cell_Oper_Reserve3 + "',");
            }
            strSql.Append("insert into WH_Cell_Operate_Record(");
            strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1));
            strSql.Append(")");
            strSql.Append(" values (");
            strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1));
            strSql.Append(")");
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #8
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(WMS_Database.WH_Cell_Operate_RecordModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update WH_Cell_Operate_Record set ");
            if (model.WareHouse_ID != null)
            {
                strSql.Append("WareHouse_ID='" + model.WareHouse_ID + "',");
            }
            if (model.WH_Cell_Code != null)
            {
                strSql.Append("WH_Cell_Code='" + model.WH_Cell_Code + "',");
            }
            if (model.WH_Cell_Oper_Type != null)
            {
                strSql.Append("WH_Cell_Oper_Type='" + model.WH_Cell_Oper_Type + "',");
            }
            else
            {
                strSql.Append("WH_Cell_Oper_Type= null ,");
            }
            if (model.WH_Cell_Oper_Detail != null)
            {
                strSql.Append("WH_Cell_Oper_Detail='" + model.WH_Cell_Oper_Detail + "',");
            }
            else
            {
                strSql.Append("WH_Cell_Oper_Detail= null ,");
            }
            if (model.WH_Cell_Oper_Datetime != null)
            {
                strSql.Append("WH_Cell_Oper_Datetime='" + model.WH_Cell_Oper_Datetime + "',");
            }
            if (model.WH_Cell_Oper_Reserve1 != null)
            {
                strSql.Append("WH_Cell_Oper_Reserve1='" + model.WH_Cell_Oper_Reserve1 + "',");
            }
            else
            {
                strSql.Append("WH_Cell_Oper_Reserve1= null ,");
            }
            if (model.WH_Cell_Oper_Reserve2 != null)
            {
                strSql.Append("WH_Cell_Oper_Reserve2='" + model.WH_Cell_Oper_Reserve2 + "',");
            }
            else
            {
                strSql.Append("WH_Cell_Oper_Reserve2= null ,");
            }
            if (model.WH_Cell_Oper_Reserve3 != null)
            {
                strSql.Append("WH_Cell_Oper_Reserve3='" + model.WH_Cell_Oper_Reserve3 + "',");
            }
            else
            {
                strSql.Append("WH_Cell_Oper_Reserve3= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where WH_Cell_Oper_RecID='" + model.WH_Cell_Oper_RecID + "' ");
            int rowsAffected = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #9
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(WMS_Database.WH_Cell_ChildrenModel model)
        {
            StringBuilder strSql  = new StringBuilder();
            StringBuilder strSql1 = new StringBuilder();
            StringBuilder strSql2 = new StringBuilder();

            if (model.Cell_Chlid_ID != null)
            {
                strSql1.Append("Cell_Chlid_ID,");
                strSql2.Append("'" + model.Cell_Chlid_ID + "',");
            }
            if (model.Cell_ID != null)
            {
                strSql1.Append("Cell_ID,");
                strSql2.Append("'" + model.Cell_ID + "',");
            }
            if (model.Cell_Chlid_Position != null)
            {
                strSql1.Append("Cell_Chlid_Position,");
                strSql2.Append("'" + model.Cell_Chlid_Position + "',");
            }
            if (model.Cell_Child_Order != null)
            {
                strSql1.Append("Cell_Child_Order,");
                strSql2.Append("" + model.Cell_Child_Order + ",");
            }
            if (model.Cell_Child_InOut != null)
            {
                strSql1.Append("Cell_Child_InOut,");
                strSql2.Append("'" + model.Cell_Child_InOut + "',");
            }
            if (model.Cell_Child_Model != null)
            {
                strSql1.Append("Cell_Child_Model,");
                strSql2.Append("'" + model.Cell_Child_Model + "',");
            }
            if (model.Cell_Child_Status != null)
            {
                strSql1.Append("Cell_Child_Status,");
                strSql2.Append("'" + model.Cell_Child_Status + "',");
            }
            if (model.Cell_Child_Run_Status != null)
            {
                strSql1.Append("Cell_Child_Run_Status,");
                strSql2.Append("'" + model.Cell_Child_Run_Status + "',");
            }
            if (model.Cell_Child_Flag != null)
            {
                strSql1.Append("Cell_Child_Flag,");
                strSql2.Append("'" + model.Cell_Child_Flag + "',");
            }
            if (model.Cell_Child_Operate_Type != null)
            {
                strSql1.Append("Cell_Child_Operate_Type,");
                strSql2.Append("'" + model.Cell_Child_Operate_Type + "',");
            }
            if (model.Cell_Child_TaskLock_ID != null)
            {
                strSql1.Append("Cell_Child_TaskLock_ID,");
                strSql2.Append("'" + model.Cell_Child_TaskLock_ID + "',");
            }
            if (model.Cell_Child_Reserve1 != null)
            {
                strSql1.Append("Cell_Child_Reserve1,");
                strSql2.Append("'" + model.Cell_Child_Reserve1 + "',");
            }
            if (model.Cell_Child_Reserve2 != null)
            {
                strSql1.Append("Cell_Child_Reserve2,");
                strSql2.Append("'" + model.Cell_Child_Reserve2 + "',");
            }
            if (model.Cell_Child_Reserve3 != null)
            {
                strSql1.Append("Cell_Child_Reserve3,");
                strSql2.Append("'" + model.Cell_Child_Reserve3 + "',");
            }
            if (model.Cell_Child_Reserve4 != null)
            {
                strSql1.Append("Cell_Child_Reserve4,");
                strSql2.Append("'" + model.Cell_Child_Reserve4 + "',");
            }
            if (model.Cell_Child_Reserve5 != null)
            {
                strSql1.Append("Cell_Child_Reserve5,");
                strSql2.Append("'" + model.Cell_Child_Reserve5 + "',");
            }
            strSql.Append("insert into WH_Cell_Children(");
            strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1));
            strSql.Append(")");
            strSql.Append(" values (");
            strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1));
            strSql.Append(")");
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #10
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(WMS_Database.WH_Cell_ChildrenModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update WH_Cell_Children set ");
            if (model.Cell_ID != null)
            {
                strSql.Append("Cell_ID='" + model.Cell_ID + "',");
            }
            else
            {
                strSql.Append("Cell_ID= null ,");
            }
            if (model.Cell_Chlid_Position != null)
            {
                strSql.Append("Cell_Chlid_Position='" + model.Cell_Chlid_Position + "',");
            }
            else
            {
                strSql.Append("Cell_Chlid_Position= null ,");
            }
            if (model.Cell_Child_Order != null)
            {
                strSql.Append("Cell_Child_Order=" + model.Cell_Child_Order + ",");
            }
            else
            {
                strSql.Append("Cell_Child_Order= null ,");
            }
            if (model.Cell_Child_InOut != null)
            {
                strSql.Append("Cell_Child_InOut='" + model.Cell_Child_InOut + "',");
            }
            else
            {
                strSql.Append("Cell_Child_InOut= null ,");
            }
            if (model.Cell_Child_Model != null)
            {
                strSql.Append("Cell_Child_Model='" + model.Cell_Child_Model + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Model= null ,");
            }
            if (model.Cell_Child_Status != null)
            {
                strSql.Append("Cell_Child_Status='" + model.Cell_Child_Status + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Status= null ,");
            }
            if (model.Cell_Child_Run_Status != null)
            {
                strSql.Append("Cell_Child_Run_Status='" + model.Cell_Child_Run_Status + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Run_Status= null ,");
            }
            if (model.Cell_Child_Flag != null)
            {
                strSql.Append("Cell_Child_Flag='" + model.Cell_Child_Flag + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Flag= null ,");
            }
            if (model.Cell_Child_Operate_Type != null)
            {
                strSql.Append("Cell_Child_Operate_Type='" + model.Cell_Child_Operate_Type + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Operate_Type= null ,");
            }
            if (model.Cell_Child_TaskLock_ID != null)
            {
                strSql.Append("Cell_Child_TaskLock_ID='" + model.Cell_Child_TaskLock_ID + "',");
            }
            else
            {
                strSql.Append("Cell_Child_TaskLock_ID= null ,");
            }
            if (model.Cell_Child_Reserve1 != null)
            {
                strSql.Append("Cell_Child_Reserve1='" + model.Cell_Child_Reserve1 + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Reserve1= null ,");
            }
            if (model.Cell_Child_Reserve2 != null)
            {
                strSql.Append("Cell_Child_Reserve2='" + model.Cell_Child_Reserve2 + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Reserve2= null ,");
            }
            if (model.Cell_Child_Reserve3 != null)
            {
                strSql.Append("Cell_Child_Reserve3='" + model.Cell_Child_Reserve3 + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Reserve3= null ,");
            }
            if (model.Cell_Child_Reserve4 != null)
            {
                strSql.Append("Cell_Child_Reserve4='" + model.Cell_Child_Reserve4 + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Reserve4= null ,");
            }
            if (model.Cell_Child_Reserve5 != null)
            {
                strSql.Append("Cell_Child_Reserve5='" + model.Cell_Child_Reserve5 + "',");
            }
            else
            {
                strSql.Append("Cell_Child_Reserve5= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where Cell_Chlid_ID='" + model.Cell_Chlid_ID + "' ");
            int rowsAffected = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }