コード例 #1
0
        /// <summary>
        /// 添加不合格品处置单
        /// </summary>
        /// <param name="model">不合格品处置单 </param>
        /// <param name="detail">明细</param>
        /// <param name="htExtAttr">扩展属性</param>
        /// <returns></returns>
        public static bool AddNoPass(CheckNotPassModel model, List <CheckNotPassDetailModel> detail, Hashtable htExtAttr)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool         result   = false;
                LogInfoModel logModel = InitLogInfo(model.ProcessNo);
                logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                result           = CheckNotPassDBHelper.AddNoPass(model, detail, htExtAttr);
                if (!result)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                    model.ID        = IDIdentityUtil.GetIDIdentity("officedba.CheckNotPass");
                }
                LogDBHelper.InsertLog(logModel);
                return(result);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, ex);
                return(false);
            }
        }
コード例 #2
0
        /// <summary>
        /// 修改建议
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool UpCustAdvice(CustAdviceModel model)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo(model.AdviceNo);
                logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                succ             = CustAdvice.UpCustAdvice(model);
                if (!succ)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                }
                model.ID = IDIdentityUtil.GetIDIdentity("officedba.CustAdvice");
                LogDBHelper.InsertLog(logModel);
                return(succ);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, ex);
                return(false);
            }
        }
コード例 #3
0
        /// <summary>
        /// 添加质检
        /// </summary>
        /// <param name="model"></param>
        /// <param name="detailList"></param>
        /// <returns></returns>
        public static bool AddQualityCheck(StorageQualityCheckApplay model, List <StorageQualityCheckApplyDetail> detailList, Hashtable htExtAttr)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool         result   = false;
                LogInfoModel logModel = InitLogInfo(model.ApplyNO);
                logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                result           = StorageQualityCheckProDBHelper.AddStoryQualityCheckDB(model, detailList, htExtAttr);
                if (!result)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                    model.ID        = IDIdentityUtil.GetIDIdentity("officedba.QualityCheckApplay");
                }
                LogDBHelper.InsertLog(logModel);
                return(result);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, ex);
                return(false);
            }
        }
コード例 #4
0
        /// <summary>
        /// 添加分店客户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool SubStorageCustAdd(SubSellCustInfoModel model)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool         result   = false;
                LogInfoModel logModel = InitLogInfo(model.CustName);
                logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                result           = SubSellOrderDBHelper.SubStorageCustAdd(model);
                if (!result)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                    model.ID        = IDIdentityUtil.GetIDIdentity("officedba.SubSellCustInfo").ToString();
                }
                LogDBHelper.InsertLog(logModel);
                return(result);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, ex);
                return(false);
            }
        }
コード例 #5
0
        public static bool AddAdjust(StorageAdjustModel model, List <StorageAdjustDetail> detail, Hashtable ht)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo(model.AdjustNo);
                logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                succ             = StorageAdjustDBHelper.AddAdjust(model, detail, ht);
                if (!succ)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                    model.ID        = IDIdentityUtil.GetIDIdentity("officedba.StorageAdjust");
                }
                LogDBHelper.InsertLog(logModel);
                return(succ);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, ex);
                return(false);
            }
        }
コード例 #6
0
        /// <summary>
        /// 仓库物品插入
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool InsertStorageProduct(StorageProductModel model)
        {
            //获取登陆用户ID
            //string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;[待修改]
            string loginUserID = "admin123";
            bool   result      = false;

            if (StorageProductDBHelper.InsertStorageProduct(model, loginUserID))
            {
                model.ID = IDIdentityUtil.GetIDIdentity("officedba.StorageProduct").ToString();
                result   = true;
            }
            return(result);
        }