Example #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);
            }
        }
Example #2
0
        /// <summary>
        /// 更新不合格品处置单
        /// </summary>
        /// <param name="model">不合格品处置单 </param>
        /// <param name="detailmodel">明细</param>
        /// <param name="SortID"></param>
        /// <param name="htExtAttr">扩展属性</param>
        /// <returns></returns>
        public static bool UpdateNoPassInfo(CheckNotPassModel model, List <CheckNotPassDetailModel> detail, string[] SortID, Hashtable htExtAttr)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo(model.ProcessNo);
                logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                succ             = CheckNotPassDBHelper.UpdateNoPassInfo(model, detail, SortID, htExtAttr);
                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, ex);
                return(false);
            }
        }
Example #3
0
    protected void btnImport_Click(object sender, ImageClickEventArgs e)
    {
        string            companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        CheckNotPassModel model     = new CheckNotPassModel();

        model.CompanyCD = companyCD;
        string ProductID = this.hiddenProductID.Value;

        model.Title      = this.txtSubject.Text.Trim();
        model.ProcessNo  = txtReportNo.Text.Trim();
        model.ReportID   = int.Parse(hiddenFromReportID.Value);
        model.BillStatus = sltBillStatus.Value;
        string theBeginTme = BeginTime.Value;
        string theEndTime  = EndTime.Value;
        string FlowStatus  = ddlFlowStatus.Value;
        int    TotalCount  = 0;

        model.Attachment = " ID Desc";
        if (this.hiddenOrder.Value != "0")
        {
            string[] myOrder = this.hiddenOrder.Value.Split('_');
            if (myOrder[1] == "a")
            {
                model.Attachment = myOrder[0] + " asc ";
            }
            else
            {
                model.Attachment = myOrder[0] + " desc ";
            }
        }
        model.Creator   = -100;
        model.Confirmor = -100;

        string EFIndex = GetBillExAttrControl1.GetExtIndexValue;
        string EFDesc  = GetBillExAttrControl1.GetExtTxtValue;

        DataTable dt = CheckNotPassBus.SearchNoPass(model, ProductID, theBeginTme, theEndTime, FlowStatus, EFIndex, EFDesc, ref TotalCount);

        //导出标题
        string headerTitle = "单据编号|单据主题|源单类型|质检报告单|物品编号|物品名称|处理负责人|处理日期|单据状态|审批状态";

        string[] header = headerTitle.Split('|');

        //导出标题所对应的列字段名称
        string columnFiled = "ProcessNo|Title|FromTypeName|ReportNo|ProNo|ProductName|EmployeeName|ProcessDate|BillStatus|FlowStatus";

        string[] field = columnFiled.Split('|');

        XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "不合格品处置单列表");
    }
Example #4
0
 public static DataTable SearchNoPass(CheckNotPassModel model, string ProductID, string BeginTime, string EndTime, string FlowStatus, string EFIndex, string EFDesc, ref int TotalCount)
 {
     return(CheckNotPassDBHelper.GetAllNoPass(model, ProductID, BeginTime, EndTime, FlowStatus, EFIndex, EFDesc, ref TotalCount));
 }
Example #5
0
 public static string GetNotPassNum(CheckNotPassModel model)
 {
     return(CheckNotPassDBHelper.GetNoExecutNum(model));
 }
Example #6
0
 /// <summary>
 /// 取消确认
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool UnConfirmBill(CheckNotPassModel model, string CheckNum)
 {
     return(CheckNotPassDBHelper.UnConfirmBill(model, CheckNum));
 }
Example #7
0
 public static bool CloseBill(CheckNotPassModel model, string Method)
 {
     return(CheckNotPassDBHelper.CloseBill(model, Method));
 }
Example #8
0
 public static DataTable GetNoPassDetailInfo(CheckNotPassModel model)
 {
     return(CheckNotPassDBHelper.GetNoPassDetail(model));
 }
Example #9
0
 public static DataTable GetNoPassInfo(CheckNotPassModel modle)
 {
     return(CheckNotPassDBHelper.GetNoPassInfo(modle));
 }