/// <summary>
 /// 根据单据状态更新控件状态
 /// </summary>
 /// <param name="billStatus">单据编辑状态</param>
 public void InitControStatus(MWEnum.BillEditStatus billStatus)
 {
     if (billStatus == MWEnum.BillEditStatus.ADD_STATUS)
     {
         btnNewBill.Visible = true;
         cmbOpType.Enabled  = true;
     }
     else
     {
         btnNewBill.Visible = false;
         cmbOpType.Enabled  = false;
     }
 }
Exemple #2
0
 /// <summary>
 /// 界面加载
 /// </summary>
 /// <param name="sender">控件</param>
 /// <param name="e">参数</param>
 private void FrmOutStoreDetail_OpenWindowBefore(object sender, EventArgs e)
 {
     GridStatus = MWEnum.DetailsEditiStatus.UPDATING;
     cmbOpType.SelectedIndexChanged -= cmbOpType_SelectedIndexChanged;
     //绑定业务类型
     InvokeController("BuildOpType", frmName);
     cmbOpType.SelectedIndexChanged += cmbOpType_SelectedIndexChanged;
     cmbOpType_SelectedIndexChanged(null, null);
     MWEnum.BillEditStatus editStus = (MWEnum.BillEditStatus)InvokeController("GetBillEditStatus");
     LoadMWOutStore();
     InvokeController("LoadBillDetails", frmName);
     SetGridExpress();
     //表格验证
     timeOutData.Focus();
 }
Exemple #3
0
        public bool InitBillHead(
            string frmName,
            MWEnum.BillEditStatus billEditStatus,
            int currentBillID)
        {
            if (LoginUserInfo.DeptId == 0)
            {
                MessageBoxShowSimple("用户没有选择登录科室");
                return(false);
            }

            billStatus = billEditStatus;
            if (billStatus == MWEnum.BillEditStatus.ADD_STATUS)
            {
                MW_OutStoreHead outHead = new MW_OutStoreHead();
                outHead.AuditFlag    = 0;
                outHead.AuditEmpID   = 0;
                outHead.AuditEmpName = string.Empty;
                outHead.Remark       = string.Empty;
                outHead.DeptID       = selectedDeptID;
                outHead.BusiType     = MWConstant.OP_MW_DEPTDRAW;//默认内耗流通出库
                outHead.BillTime     = System.DateTime.Now;
                outHead.RegTime      = System.DateTime.Now;
                outHead.RegEmpID     = GetUserInfo().EmpId;
                outHead.RegEmpName   = GetUserInfo().EmpName;
                currentHead          = outHead;
                ifrmOutstoreDetail.BindOutHeadInfo(currentHead);
            }
            else
            {
                Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
                {
                    request.AddData(MWConstant.MW_Out_SYSTEM);
                    request.AddData(currentBillID);
                });

                ServiceResponseData retdata     = InvokeWcfService("DrugProject.Service", "MaterialOutStoreController", "GetEditBillHead", requestAction);
                MW_OutStoreHead     inStoreHead = retdata.GetData <MW_OutStoreHead>(0);
                currentHead = inStoreHead;
                ifrmOutstoreDetail.BindOutHeadInfo(currentHead);
            }

            ifrmOutstoreDetail.InitControStatus(billEditStatus);
            return(true);
        }
Exemple #4
0
        public void InitBillHead(string frmName, MWEnum.BillEditStatus billEditStatus, int currentBillID)
        {
            billStatus = billEditStatus;
            if (billStatus == MWEnum.BillEditStatus.ADD_STATUS)
            {
                MW_InStoreHead inHead = new MW_InStoreHead();
                inHead.AuditFlag    = 0;
                inHead.AuditEmpID   = 0;
                inHead.AuditEmpName = string.Empty;
                inHead.Remark       = string.Empty;
                inHead.OpEmpID      = LoginUserInfo.EmpId;
                inHead.DeptID       = selectedDeptID;
                inHead.BusiType     = DGConstant.OP_DW_BUYINSTORE;
                inHead.BillTime     = System.DateTime.Now;
                inHead.RegEmpID     = GetUserInfo().EmpId;
                inHead.RegEmpName   = GetUserInfo().EmpName;
                currentHead         = inHead;
                ifrmInstoreDetail.BindInHeadInfo(currentHead);
            }
            else
            {
                Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
                {
                    request.AddData(MWConstant.OP_MW_INSTORE);
                    request.AddData(currentBillID);
                });

                ServiceResponseData retdata     = InvokeWcfService("DrugProject.Service", "MaterialInStoreController", "GetEditBillHead", requestAction);
                MW_InStoreHead      inStoreHead = retdata.GetData <MW_InStoreHead>(0);
                currentHead.DeptID = selectedDeptID;
                currentHead        = inStoreHead;
                ifrmInstoreDetail.BindInHeadInfo(currentHead);
            }

            ifrmInstoreDetail.InitControStatus(billEditStatus);
        }