Example #1
0
        public static bool UpdateAdjust(StorageAdjustModel model, List <StorageAdjustDetail> detail, string[] SortID, Hashtable ht)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo(model.AdjustNo);
                logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                succ             = StorageAdjustDBHelper.UpdateAdjust(model, detail, SortID, ht);
                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 #2
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);
            }
        }
    protected void btnImport_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            string             companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            StorageAdjustModel model     = new StorageAdjustModel();
            model.CompanyCD  = companyCD;
            model.Title      = this.txtSubject.Text.Trim();
            model.AdjustNo   = this.txtReportNo.Text.Trim();
            model.StorageID  = int.Parse(this.hiddenStorageID.SelectedValue);
            model.BillStatus = BillStatus.Value;
            string theBeginTime = this.BeginTime.Value;
            string theEndTime   = this.EndTime.Value;
            model.Executor   = int.Parse(hiddenExecutor.Value);
            model.DeptID     = int.Parse(hiddenDeptID.Value);
            model.ReasonType = int.Parse(ddlReason.SelectedValue);
            string theFlowStatus = FlowStatus.Value;
            int    TotalCount    = 0;
            string EFIndex       = Request.QueryString["EFIndex"];
            string EFDesc        = Request.QueryString["EFDesc"];
            GetBillExAttrControl2.ExtIndex = EFIndex;
            GetBillExAttrControl2.ExtValue = EFDesc;
            GetBillExAttrControl2.SetExtControlValue();
            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 BatchNo = this.txtBatchNo.Value.ToString();
            model.BatchNo = BatchNo;

            DataTable dt = StorageAdjustBus.GetAllAdjust(model, EFIndex, EFDesc, theBeginTime, theEndTime, theFlowStatus, ref TotalCount);

            //导出标题
            string   headerTitle = "单据编号|单据主题|仓库|经办人|部门|调整时间|调整原因|单据状态|审批状态";
            string[] header      = headerTitle.Split('|');

            //导出标题所对应的列字段名称
            string   columnFiled = "AdjustNo|Title|StorageName|EmployeeName|DeptName|AdjustDate|CodeName|BillStatus|FlowStatus";
            string[] field       = columnFiled.Split('|');

            XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "日常调整单列表");
        }
        catch
        { }
    }
Example #4
0
 public static DataTable GetAdjustDetail(StorageAdjustModel model)
 {
     return(StorageAdjustDBHelper.GetAdjustDetail(model));
 }
Example #5
0
 /// <summary>
 /// 取消确认
 /// </summary>
 /// <param name="model"></param>
 /// <param name="detail"></param>
 /// <returns></returns>
 public static bool UnConfirmBill(StorageAdjustModel model, List <StorageAdjustDetail> detail)
 {
     return(StorageAdjustDBHelper.UnConfirmBill(model, detail));
 }
Example #6
0
 public static DataTable GetAllAdjust(StorageAdjustModel model, string EFIndex, string EFDesc, string BetinTime, string EndTime, string FlowStatus, ref int TotalCount)
 {
     return(StorageAdjustDBHelper.GetAllAdjust(model, EFIndex, EFDesc, BetinTime, EndTime, FlowStatus, ref TotalCount));
 }
Example #7
0
 public static bool CloseBill(StorageAdjustModel model, string method)
 {
     return(StorageAdjustDBHelper.CloseBill(model, method));
 }