Ejemplo n.º 1
0
        /// <summary>
        /// 更新物料需求计划和物料需求计划明细信息
        /// </summary>
        /// <param name="model"></param>
        /// <param name="UpdateID"></param>
        /// <returns></returns>
        public static bool UpdateMRPInfo(MRPModel model, Hashtable ht, string UpdateID)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool   succ        = false;
                string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;

                LogInfoModel logModel = InitLogInfo(model.MRPNo, 0);
                logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;

                succ = MRPDBHelper.UpdateMRPInfo(model, ht, loginUserID, UpdateID);
                if (!succ)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                }
                LogDBHelper.InsertLog(logModel);
                return(succ);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, 0, ex);
                return(false);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 确认或结单
        /// </summary>
        /// <param name="model"></param>
        /// <param name="isConfirm"></param>
        /// <returns></returns>
        public static bool ConfirmOrCompleteMRP(MRPModel model, int OperateType)
        {
            string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;

            //string loginUserID = "admin";//[待修改]
            return(MRPDBHelper.ConfirmOrCompleteMRP(model, loginUserID, OperateType));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 主生产计划唯一性验证
 /// </summary>
 /// <param name="ParentCode">上级编码</param>
 /// <returns>大于0:已经有物料需求计划引用该计划了,否则无物料需求计划引用该计划</returns>
 public static int PlanCount(MRPModel model)
 {
     try
     {
         return(MRPDBHelper.PlanCount(model));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 查询主生产计划单信息
 /// </summary>
 /// <param name="model">查询条件</param>
 /// <returns></returns>
 public static DataTable GetMRPListBycondition(MRPModel model, int FlowStatus, int BillTypeFlag, int BillTypeCode, string EFIndex, string EFDesc, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
 {
     try
     {
         return(MRPDBHelper.GetMRPListBycondition(model, FlowStatus, BillTypeFlag, BillTypeCode, EFIndex, EFDesc, pageIndex, pageCount, OrderBy, ref totalCount));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// MRP明细信息
 /// </summary>
 /// <returns>DataTable</returns>
 public static DataTable GetMRPDetailInfo(MRPModel model)
 {
     try
     {
         return(MRPDBHelper.GetMRPDetailInfo(model));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 6
0
        /// <summary>
        /// 取消确认
        /// </summary>
        /// <param name="model"></param>
        /// <param name="isConfirm"></param>
        /// <returns></returns>
        public static bool CancelConfirmMRP(MRPModel model, int BillTypeFlag, int BillTypeCode)
        {
            string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;

            return(MRPDBHelper.CancelConfirmOperate(model, BillTypeFlag, BillTypeCode, loginUserID));
        }