Esempio n. 1
0
        /// <summary>
        /// 退料单插入
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool InsertBackMaterial(BackMaterialModel model, Hashtable ht, out string ID)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

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

                LogInfoModel logModel = InitLogInfo(model.BackNo, 0);
                logModel.Element = ConstUtil.LOG_PROCESS_INSERT;

                succ = BackMaterialDBHelper.InsertBackMaterial(model, ht, loginUserID, out ID);
                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);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 确认或结单
        /// </summary>
        /// <param name="model"></param>
        /// <param name="isConfirm"></param>
        /// <returns></returns>
        public static bool ConfirmOrCompleteBackMaterial(BackMaterialModel model, int OperateType)
        {
            string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;

            //string loginUserID = "admin";//[待修改]
            return(BackMaterialDBHelper.ConfirmOrCompleteBackMaterial(model, loginUserID, OperateType));
        }
Esempio n. 3
0
 /// <summary>
 /// 退料单明细详细信息
 /// </summary>
 /// <returns>DataTable</returns>
 public static DataTable GetBackDetailInfo(BackMaterialModel model)
 {
     try
     {
         return(BackMaterialDBHelper.GetBackDetailInfo(model));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 4
0
 /// <summary>
 /// 收料
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool ReceiveBackMaterial(BackMaterialModel model, out string reason)
 {
     try
     {
         return(BackMaterialDBHelper.ReceiveBackMaterial(model, out reason));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 5
0
 /// <summary>
 /// 通过检索条件查询退料单信息
 /// </summary>
 /// <returns>DataTable</returns>
 public static DataTable GetBackMaterialListBycondition(BackMaterialModel model, string ReceiveDateStart, string ReceiveDateEnd, int BillTypeFlag, int BillTypeCode, int FlowStatus, string EFIndex, string EFDesc, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
 {
     try
     {
         return(BackMaterialDBHelper.GetBackMaterialListBycondition(model, ReceiveDateStart, ReceiveDateEnd, BillTypeFlag, BillTypeCode, FlowStatus, EFIndex, EFDesc, pageIndex, pageCount, OrderBy, ref totalCount));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 6
0
        /// <summary>
        /// 删除退料单
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="CompanyCD"></param>
        /// <returns></returns>
        public static bool DeleteBackMaterial(string ID, string CompanyCD)
        {
            if (string.IsNullOrEmpty(ID))
            {
                return(false);
            }
            if (string.IsNullOrEmpty(CompanyCD))
            {
                CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            }

            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            bool isSucc = BackMaterialDBHelper.DeleteBackMaterial(ID, CompanyCD);
            //定义变量
            string remark;

            //成功时
            if (isSucc)
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            else
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //获取删除的编号列表
            string[] noList = ID.Split(',');
            //遍历所有编号,登陆操作日志
            for (int i = 0; i < noList.Length; i++)
            {
                //获取编号
                string no = noList[i];
                //替换两边的 '
                no = no.Replace("'", string.Empty);

                //操作日志
                LogInfoModel logModel = InitLogInfo("退料单ID:" + no, 1);
                //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空
                logModel.Element = ConstUtil.LOG_PROCESS_DELETE;
                //设置操作成功标识
                logModel.Remark = remark;

                //登陆日志
                LogDBHelper.InsertLog(logModel);
            }
            return(isSucc);
        }
Esempio n. 7
0
        /// <summary>
        /// 取消确认
        /// </summary>
        /// <param name="model"></param>
        /// <param name="isConfirm"></param>
        /// <returns></returns>
        public static bool CancelConfirmBackMaterial(BackMaterialModel model, int BillTypeFlag, int BillTypeCode)
        {
            string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;

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