Beispiel #1
0
        /// <summary>
        /// 更新生产任务汇报单和各明细信息
        /// </summary>
        /// <param name="model"></param>
        /// <param name="modelProduct"></param>
        /// <param name="modelStaff"></param>
        /// <param name="modelMachine"></param>
        /// <param name="modelMeterial"></param>
        /// <returns></returns>
        public static bool UpdateManufactureReportInfo(ManufactureReportModel model, Hashtable ht, ManufactureReportProductModel modelProduct, ManufactureReportStaffModel modelStaff, ManufactureReportMachineModel modelMachine, ManufactureReportMeterialModel modelMeterial)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

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

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

                succ = ManufactureReportDBHelper.UpdateManufactureReportInfo(model, ht, modelProduct, modelStaff, modelMachine, modelMeterial, loginUserID);
                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);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 确认生产任务汇报单
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool ConfirmMenufactureReport(ManufactureReportModel model, int EditType)
        {
            string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;

            //string loginUserID = "admin";//[待修改]
            return(ManufactureReportDBHelper.ConfirmMenufactureReport(model, loginUserID, EditType));
        }
Beispiel #3
0
 /// <summary>
 /// 打印生产任务单汇报明细表
 /// </summary>
 /// <param name="CompanyCD"></param>
 /// <param name="DeptID"></param>
 /// <param name="TaskNo"></param>
 /// <param name="ConfirmDateStart"></param>
 /// <param name="ConfirmDateEnd"></param>
 /// <param name="orderColumn"></param>
 /// <param name="orderType"></param>
 /// <returns></returns>
 public static DataTable GetManufactureReportListBycondition_Operating_Print(string CompanyCD, int DeptID, string TaskNo, string ConfirmDateStart, string ConfirmDateEnd, string orderColumn, string orderType)
 {
     try
     {
         return(ManufactureReportDBHelper.GetManufactureReportListBycondition_Operating_Print(CompanyCD, DeptID, TaskNo, ConfirmDateStart, ConfirmDateEnd, orderColumn, orderType));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Beispiel #4
0
 /// <summary>
 /// 生产任务单汇报明细表
 /// </summary>
 /// <param name="CompanyCD"></param>
 /// <param name="DeptID"></param>
 /// <param name="TaskNo"></param>
 /// <param name="ConfirmDateStart"></param>
 /// <param name="ConfirmDateEnd"></param>
 /// <param name="pageIndex"></param>
 /// <param name="pageCount"></param>
 /// <param name="OrderBy"></param>
 /// <param name="totalCount"></param>
 /// <returns></returns>
 public static DataTable GetManufactureReportListBycondition_Operating(string CompanyCD, int DeptID, string TaskNo, string ConfirmDateStart, string ConfirmDateEnd, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
 {
     try
     {
         return(ManufactureReportDBHelper.GetManufactureReportListBycondition_Operating(CompanyCD, DeptID, TaskNo, ConfirmDateStart, ConfirmDateEnd, pageIndex, pageCount, OrderBy, ref totalCount));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Beispiel #5
0
 /// <summary>
 /// 通过检索条件查询生产任务汇报单信息
 /// </summary>
 /// <returns>DataTable</returns>
 public static DataTable GetManufactureReportListBycondition(ManufactureReportModel model, string EFIndex, string EFDesc, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
 {
     try
     {
         return(ManufactureReportDBHelper.GetManufactureReportListBycondition(model, EFIndex, EFDesc, pageIndex, pageCount, OrderBy, ref totalCount));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Beispiel #6
0
 /// <summary>
 /// 设备列表
 /// </summary>
 /// <returns>DataTable</returns>
 public static DataTable GetEquipmentList(string CompanyCD)
 {
     try
     {
         return(ManufactureReportDBHelper.GetEquipmentList(CompanyCD));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Beispiel #7
0
 /// <summary>
 /// 物料明细
 /// </summary>
 /// <returns>DataTable</returns>
 public static DataTable GetManufactureReportMeterial(ManufactureReportModel model)
 {
     try
     {
         return(ManufactureReportDBHelper.GetManufactureReportMeterial(model));
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Beispiel #8
0
        /// <summary>
        /// 删除生产任务汇报单
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="CompanyCD"></param>
        /// <returns></returns>
        public static bool DeleteManufactureReport(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 = ManufactureReportDBHelper.DeleteManufactureReport(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);
        }