コード例 #1
0
        public void LoadBillDetails(string frmName)
        {
            Dictionary <string, string> headInfo      = null;
            Action <ClientRequestData>  requestAction = null;
            ServiceResponseData         retdata       = null;

            switch (frmName)
            {
            case "FrmOutStore":
                headInfo = ifrmOutStore.GetCurrentHeadID();
                if (headInfo != null)
                {
                    requestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(MWConstant.OP_MW_DEPTDRAW);
                        request.AddData(headInfo);
                    });

                    retdata = InvokeWcfService("DrugProject.Service", "MaterialOutStoreController", "LoadBillDetails", requestAction);
                    ifrmOutStore.BindDeatailGrids(retdata.GetData <DataTable>(0));
                }
                else
                {
                    ifrmOutStore.BindDeatailGrids(null);
                }

                break;

            case "FrmOutStoreDetail":
                headInfo = new Dictionary <string, string>();
                headInfo.Add("OutHeadID", currentHead.OutStoreHeadID.ToString());
                requestAction = ((ClientRequestData request) =>
                {
                    request.AddData(MWConstant.OP_MW_DEPTDRAW);    //出库
                    request.AddData(headInfo);
                });
                retdata        = InvokeWcfService("DrugProject.Service", "MaterialOutStoreController", "LoadBillDetails", requestAction);
                currentDetails = retdata.GetData <DataTable>(0);
                ifrmOutstoreDetail.BindDetailsGrid(currentDetails);
                break;

            default:
                break;
            }
        }
コード例 #2
0
        public void LoadBillDetails(string frmName)
        {
            Dictionary <string, string> headInfo      = null;
            Action <ClientRequestData>  requestAction = null;
            ServiceResponseData         retdata       = null;

            switch (frmName)
            {
            //药房出库
            case "FrmOutStoreDS":
                headInfo = frmOutStoreDS.GetCurrentHeadID();
                if (headInfo != null)
                {
                    requestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(DGConstant.OP_DS_DEPTDRAW);
                        request.AddData(headInfo);
                    });
                    retdata = InvokeWcfService("DrugProject.Service", "OutStoreController", "LoadBillDetails", requestAction);
                    frmOutStoreDS.BindDeatailGrids(retdata.GetData <DataTable>(0));
                }
                else
                {
                    frmOutStoreDS.BindDeatailGrids(null);
                }
                break;

            //药库出库
            case "FrmOutStoreDW":
                headInfo = frmOutStoreDW.GetCurrentHeadID();
                if (headInfo != null)
                {
                    headInfo.Add("deptId", selectedDeptID.ToString());
                    requestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(DGConstant.OP_DW_DEPTDRAW);
                        request.AddData(headInfo);
                    });
                    retdata = InvokeWcfService("DrugProject.Service", "OutStoreController", "LoadBillDetails", requestAction);
                    frmOutStoreDW.BindDeatailGrids(retdata.GetData <DataTable>(0));
                }
                else
                {
                    frmOutStoreDW.BindDeatailGrids(null);
                }
                break;

            //药库出库明细
            case "FrmOutStoreDetailDW":
                headInfo = new Dictionary <string, string>();
                headInfo.Add("OutHeadID", currentDWHead.OutStoreHeadID.ToString());
                requestAction = ((ClientRequestData request) =>
                {
                    request.AddData(DGConstant.OP_DW_DEPTDRAW);    //出库
                    request.AddData(headInfo);
                });
                retdata          = InvokeWcfService("DrugProject.Service", "OutStoreController", "LoadBillDetails", requestAction);
                currentDWDetails = retdata.GetData <DataTable>(0);
                frmOutstoreDetailDW.BindDetailsGrid(currentDWDetails);
                break;

            //药房出库明细
            case "FrmOutStoreDetailDS":
                headInfo = new Dictionary <string, string>();
                headInfo.Add("OutHeadID", currentDSHead.OutStoreHeadID.ToString());
                requestAction = ((ClientRequestData request) =>
                {
                    request.AddData(DGConstant.OP_DS_DEPTDRAW);
                    request.AddData(headInfo);
                });
                retdata          = InvokeWcfService("DrugProject.Service", "OutStoreController", "LoadBillDetails", requestAction);
                currentDSDetails = retdata.GetData <DataTable>(0);
                frmOutstoreDetailDS.BindDetailsGrid(currentDSDetails);
                break;

            default:
                break;
            }
        }