Exemplo n.º 1
0
        /// <summary>
        /// 事件
        /// </summary>
        /// <param name="sender">对象</param>
        /// <param name="e">参数</param>
        private void FrmOutStoreDetail_OpenWindowBefore(object sender, EventArgs e)
        {
            this.txtLostReason.Visible = false;
            this.lbLostReason.Visible  = false;
            GridStatus = DGEnum.DetailsEditiStatus.UPDATING;
            cmbOpType.SelectedIndexChanged -= cmbOpType_SelectedIndexChanged;

            //绑定业务类型
            InvokeController("BuildOpType", frmName, frmName == "FrmOutStoreDetailDW" ? DGConstant.OP_DW_SYSTEM : DGConstant.OP_DS_SYSTEM);
            cmbOpType.SelectedIndexChanged += cmbOpType_SelectedIndexChanged;
            DGEnum.BillEditStatus editStus = (DGEnum.BillEditStatus)InvokeController("GetBillEditStatus");
            if (frmName == "FrmOutStoreDetailDW")
            {
                cmbOpType.SelectedValue = CurretDwOutStoreHead.BusiType;
                cmbOpType_SelectedIndexChanged(null, null);
                var dataGridViewColumn = dgDetails.Columns["UnitName"];
                if (dataGridViewColumn != null)
                {
                    dataGridViewColumn.Visible = false;
                }

                var gridViewColumn = dgDetails.Columns["uAmount"];
                if (gridViewColumn != null)
                {
                    gridViewColumn.Visible = false;
                }
            }
            else
            {
                cmbOpType_SelectedIndexChanged(null, null);
                var dataGridViewColumn = dgDetails.Columns["UnitName"];
                if (dataGridViewColumn != null)
                {
                    dataGridViewColumn.Visible = true;
                }

                var gridViewColumn = dgDetails.Columns["UnitAmount"];
                if (gridViewColumn != null)
                {
                    gridViewColumn.Visible = true;
                }
            }

            //药库可出库药品
            LoadDrugOutStore();

            ////获取药品批次信息
            InvokeController("GetDrugBatchInfo", frmName);
            InvokeController("LoadBillDetails", frmName);
            SetGridExpress();

            //表格验证
            // SetValidTime();
            timeOutData.Focus();
        }
Exemplo n.º 2
0
 /// <summary>
 /// 初始化网格状态
 /// </summary>
 /// <param name="billStatus">网格状态</param>
 public void InitControStatus(DGEnum.BillEditStatus billStatus)
 {
     if (billStatus == DGEnum.BillEditStatus.ADD_STATUS)
     {
         btnNewDetail.Enabled = true;
     }
     else
     {
         btnNewDetail.Enabled = false;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 初始化控件状态
 /// </summary>
 /// <param name="billStatus">状态值</param>
 public void InitControStatus(DGEnum.BillEditStatus billStatus)
 {
     if (billStatus == DGEnum.BillEditStatus.ADD_STATUS)
     {
         btnNewBill.Enabled     = true;
         cmbOpType.Enabled      = true;
         btnReadInStore.Enabled = true;
         btnApply.Enabled       = true;
         txtDept.Enabled        = true;
     }
     else
     {
         btnNewBill.Enabled     = false;
         cmbOpType.Enabled      = false;
         btnReadInStore.Enabled = false;
         btnApply.Enabled       = false;
         txtDept.Enabled        = false;
     }
 }
        public void InitBillHead(
            string frmName,
            DGEnum.BillEditStatus billEditStatus,
            int currentBillID)
        {
            billStatus = billEditStatus;
            if (frmName == "FrmCheck")
            {
                if (billStatus == DGEnum.BillEditStatus.ADD_STATUS)
                {
                    MW_CheckHead inHead = new MW_CheckHead();
                    inHead.AuditFlag    = 0;
                    inHead.AuditEmpID   = 0;
                    inHead.AuditEmpName = string.Empty;
                    inHead.Remark       = string.Empty;
                    inHead.DelFlag      = 0;
                    inHead.DeptID       = selectedDeptID;
                    inHead.BusiType     = MWConstant.OP_MW_CHECK;
                    inHead.RegTime      = System.DateTime.Now;
                    inHead.RegEmpID     = GetUserInfo().EmpId;
                    inHead.RegEmpName   = GetUserInfo().EmpName;
                    inHead.BillNO       = 0;
                    currentMWHead       = inHead;
                    frmCheckDetail.BindInHeadInfo(currentMWHead);
                }
                else
                {
                    Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(MWConstant.MW_IN_SYSTEM);
                        request.AddData(currentBillID);
                    });

                    ServiceResponseData retdata     = InvokeWcfService("DrugProject.Service", "MaterialCheckStoreController", "GetEditBillHead", requestAction);
                    MW_CheckHead        inStoreHead = retdata.GetData <MW_CheckHead>(0);
                    currentMWHead = inStoreHead;
                    frmCheckDetail.BindInHeadInfo(currentMWHead);
                }

                frmCheckDetail.InitControStatus(billEditStatus);
            }
        }
Exemplo n.º 5
0
        public void InitBillHead(DGEnum.BillEditStatus billEditStatus, int currentBillID)
        {
            billStatus = billEditStatus;
            if (billStatus == DGEnum.BillEditStatus.ADD_STATUS)
            {
                DG_AdjHead initHead = new DG_AdjHead();
                initHead.AuditFlag = 0;
                initHead.RegTime   = System.DateTime.Now;
                initHead.RegEmpID  = GetUserInfo().EmpId;
                initHead.Remark    = string.Empty;
                initHead.ExecFlag  = 0;
                initHead.DeptID    = LoginUserInfo.DeptId;
                initHead.DelFlag   = 0;
                initHead.BusiType  = DGConstant.OP_DW_ADJPRICE;
                curretDGAdjHead    = initHead;
                frmAdjPriceDetail.BindInHeadInfo(curretDGAdjHead);
            }

            frmAdjPriceDetail.InitControStatus(billEditStatus);
        }
Exemplo n.º 6
0
        public bool InitBillHead(string frmName, DGEnum.BillEditStatus billEditStatus, int currentBillID)
        {
            if (LoginUserInfo.DeptId == 0)
            {
                MessageBoxShowSimple("用户没有选择登录科室");
                return(false);
            }

            billStatus = billEditStatus;
            if (frmName == "FrmOutStoreDW")
            {
                if (billStatus == DGEnum.BillEditStatus.ADD_STATUS)
                {
                    DW_OutStoreHead outHead = new DW_OutStoreHead();
                    outHead.AuditFlag    = 0;
                    outHead.AuditEmpID   = 0;
                    outHead.AuditEmpName = string.Empty;
                    outHead.Remark       = string.Empty;
                    outHead.DeptID       = selectedDeptID;
                    outHead.BusiType     = DGConstant.OP_DW_DEPTDRAW;//默认内耗流通出库
                    outHead.BillTime     = System.DateTime.Now;
                    outHead.RegTime      = System.DateTime.Now;
                    outHead.RegEmpID     = GetUserInfo().EmpId;
                    outHead.RegEmpName   = GetUserInfo().EmpName;
                    currentDWHead        = outHead;
                    frmOutstoreDetailDW.BindInHeadInfo(currentDWHead);
                }
                else
                {
                    Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(DGConstant.OP_DW_SYSTEM);
                        request.AddData(currentBillID);
                    });
                    ServiceResponseData retdata     = InvokeWcfService("DrugProject.Service", "OutStoreController", "GetEditBillHead", requestAction);
                    DW_OutStoreHead     inStoreHead = retdata.GetData <DW_OutStoreHead>(0);
                    currentDWHead = inStoreHead;
                    if (currentDWHead.ApplyHeadId != 0)
                    {
                        frmOutstoreDetailDW.IsApplyStatus = true;
                    }

                    frmOutstoreDetailDW.BindInHeadInfo(currentDWHead);
                }

                frmOutstoreDetailDW.InitControStatus(billEditStatus);
            }
            else
            {
                if (billStatus == DGEnum.BillEditStatus.ADD_STATUS)
                {
                    DS_OutStoreHead outHead = new DS_OutStoreHead();
                    outHead.AuditFlag    = 0;
                    outHead.AuditEmpID   = 0;
                    outHead.AuditEmpName = string.Empty;
                    outHead.Remark       = string.Empty;
                    outHead.DeptID       = selectedDeptID;
                    outHead.BusiType     = DGConstant.OP_DS_DEPTDRAW;//默认内耗流通出库
                    outHead.BillTime     = System.DateTime.Now;
                    outHead.RegTime      = System.DateTime.Now;
                    outHead.RegEmpID     = GetUserInfo().EmpId;
                    outHead.RegEmpName   = GetUserInfo().EmpName;
                    currentDSHead        = outHead;
                    frmOutstoreDetailDS.BindInHeadInfo(currentDSHead);
                }
                else
                {
                    Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(DGConstant.OP_DS_SYSTEM);
                        request.AddData(currentBillID);
                    });
                    ServiceResponseData retdata      = InvokeWcfService("DrugProject.Service", "OutStoreController", "GetEditBillHead", requestAction);
                    DS_OutStoreHead     outStoreHead = retdata.GetData <DS_OutStoreHead>(0);
                    outStoreHead.DeptID = selectedDeptID;
                    currentDSHead       = outStoreHead;
                    frmOutstoreDetailDS.BindInHeadInfo(currentDSHead);
                }

                frmOutstoreDetailDS.InitControStatus(billEditStatus);
            }

            return(true);
        }
Exemplo n.º 7
0
        public void InitBillHead(string frmName, DGEnum.BillEditStatus billEditStatus, int currentBillID)
        {
            billStatus = billEditStatus;
            if (frmName == "FrmInStoreDW")
            {
                if (billStatus == DGEnum.BillEditStatus.ADD_STATUS)
                {
                    DW_InStoreHead inHead = new DW_InStoreHead();
                    inHead.AuditFlag    = 0;
                    inHead.AuditEmpID   = 0;
                    inHead.AuditEmpName = string.Empty;
                    inHead.Remark       = string.Empty;
                    inHead.OpEmpID      = 0;
                    inHead.OpEmpName    = string.Empty;
                    inHead.DeptID       = selectedDeptID;
                    inHead.BusiType     = DGConstant.OP_DW_BUYINSTORE;
                    inHead.BillTime     = System.DateTime.Now;
                    inHead.RegEmpID     = GetUserInfo().EmpId;
                    inHead.RegEmpName   = GetUserInfo().EmpName;
                    currentDWHead       = inHead;
                    frmInstoreDetailDW.BindInHeadInfo(currentDWHead);
                }
                else
                {
                    Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(DGConstant.OP_DW_SYSTEM);
                        request.AddData(currentBillID);
                    });
                    ServiceResponseData retdata     = InvokeWcfService("DrugProject.Service", "InStoreController", "GetEditBillHead", requestAction);
                    DW_InStoreHead      inStoreHead = retdata.GetData <DW_InStoreHead>(0);
                    currentDWHead = inStoreHead;
                    frmInstoreDetailDW.BindInHeadInfo(currentDWHead);
                }

                frmInstoreDetailDW.InitControStatus(billEditStatus);
            }
            else
            {
                if (billStatus == DGEnum.BillEditStatus.ADD_STATUS)
                {
                    DS_InstoreHead head = new DS_InstoreHead();
                    head.AuditFlag    = 0;
                    head.AuditEmpID   = 0;
                    head.AuditEmpName = string.Empty;
                    head.Remark       = string.Empty;
                    head.OpEmpID      = 0;
                    head.OpEmpName    = string.Empty;
                    head.DeptID       = selectedDeptID;
                    head.BusiType     = DGConstant.OP_DW_BUYINSTORE;
                    head.BillTime     = System.DateTime.Now;
                    head.RegEmpID     = GetUserInfo().EmpId;
                    head.RegEmpName   = GetUserInfo().EmpName;
                    currentDSHead     = head;
                    frmInstoreDetailDS.BindInHeadInfo(currentDSHead);
                }
                else
                {
                    Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(DGConstant.OP_DS_SYSTEM);
                        request.AddData(currentBillID);
                    });
                    ServiceResponseData retdata = InvokeWcfService("DrugProject.Service", "InStoreController", "GetEditBillHead", requestAction);
                    DS_InstoreHead      inHead  = retdata.GetData <DS_InstoreHead>(0);
                    inHead.DeptID   = selectedDeptID;
                    inHead.BusiType = DGConstant.OP_DS_FIRSTIN;
                    currentDSHead   = inHead;
                    frmInstoreDetailDS.BindInHeadInfo(inHead);
                }

                frmInstoreDetailDS.InitControStatus(billEditStatus);
            }
        }