private void FrmYFInMaster_Load(object sender, EventArgs e) { try { chkRegTime.Checked = true; cobPayState.SelectedIndex = 0; if (_belongSystem == ConfigManager.YF_SYSTEM) { _billQurey = BillFactory.GetQuery(ConfigManager.OP_YF_INSTORE); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_INSTORE); tsrbtnPay.Visible = false; tsrbtnPrintTotal.Visible = false; dgrdInMaker.Columns["ColBtnBackStore"].Visible = false; } else { _billQurey = BillFactory.GetQuery(ConfigManager.OP_YK_INOPTYPE); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_INOPTYPE); } LoadData(); } catch (Exception error) { MessageBox.Show(error.Message); } }
public ZYFrmPresDispense(long currentUserId, long currentDeptId) { _currentUserId = currentUserId; _currentDeptId = currentDeptId; InitializeComponent(); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_DISPENSE + "ZY_ECONOMY"); }
private void tsrbtnDelBill_Click(object sender, EventArgs e) { if (_currentMaster == null) { MessageBox.Show("请选中一行"); return; } if (_currentMaster.Audit_Flag == 1) { MessageBox.Show("不能对已审核单据进行操作"); return; } else { try { if (MessageBox.Show("您确认要删除所选单据么?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { _billProcessor = BillFactory.GetProcessor(_currentMaster.OpType); _billProcessor.DelBill(_currentMaster); LoadData(); } } catch (Exception error) { MessageBox.Show(error.Message); return; } } }
private void FrmYFInMaster_Load(object sender, EventArgs e) { chkRegTime.Checked = true; radNotAudit.Checked = true; _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_APPLYIN); LoadData(); }
public static void Main2() { BillProcessor.BuildDocument(); BillProcessor.BuildMultipleDocuments(); BillProcessor.CreateDocumentsFromXml(); LoadingAndSaving.LoadAndSaveToStream(); LoadingAndSaving.LoadEncryptedDocument(); }
public ZYFrmDrugDispenseJG(long currentUserId, long currentDeptId, string chineseName) { _currentUserId = currentUserId; _currentDeptId = currentDeptId; _chineseName = chineseName; InitializeComponent(); this.Text = _chineseName; _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_DISPENSE + "ZY_ECONOMY"); }
public ZYFrmDrugRefund(long currentUserId, long currentDeptId, string chineseName) { _currentUserId = currentUserId; _currentDeptId = currentDeptId; _chineseName = chineseName; _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_REFUND + "ZY"); this.Text = _chineseName; InitializeComponent(); }
public MZFrmDrugRefund(long currentUserId, long currentDeptId, string chineseName) { _currentUserId = currentUserId; _currentDeptId = currentDeptId; _chineseName = chineseName; _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_REFUND + "MZ"); _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE); InitializeComponent(); this.Text = _chineseName; }
public FrmYFApplyorder(long currentUserId, long currentDeptId, int beginState, bool isBuildByLimit) { _currentUserId = currentUserId; _currentDeptId = currentDeptId; _currentState = beginState; _isBuildByLimit = isBuildByLimit; _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_APPLYIN); _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_APPLYIN); _storeQuery = StoreFactory.GetQuery(ConfigManager.YK_SYSTEM); InitializeComponent(); //设置起始焦点 }
public FrmStockControl(IFrmStockPlan frmstockplan) { try { _frmstockplan = frmstockplan; _drugInfo = DrugBaseDataBll.YD_LoadDrugInfo(0, 0); _frmstockplan.RefreshDurgInfo(_drugInfo); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_STOCKPLAN); _billQuery = BillFactory.GetQuery(ConfigManager.OP_YK_STOCKPLAN); } catch (Exception error) { throw error; } }
private void FrmOutOrder_Load(object sender, EventArgs e) { txtApplyPeople.Text = new User(_currentUserId).Name; if (_opType == ConfigManager.OP_YK_REPORTLOSS || _opType == ConfigManager.OP_YF_REPORTLOSS) { txtOpType.Text = "药品报损"; txtOutDept.Text = "无领药科室"; txtOutDept.ReadOnly = true; txtApplyPeople.ReadOnly = true; txtByOptype.ReadOnly = false; } else { this.txtOpType.Text = "科室领药"; txtByOptype.ReadOnly = true; } if (_belongSystem == ConfigManager.YK_SYSTEM) { _billQuery = BillFactory.GetQuery(ConfigManager.DEF_YK_OUT); } else if (_belongSystem == ConfigManager.YF_SYSTEM) { _billQuery = BillFactory.GetQuery(ConfigManager.DEF_YF_OUT); txtBatchNum.ReadOnly = true; } _billProcessor = BillFactory.GetProcessor(_opType); //如果是添加单据状态 if (_currentState == ADD) { //生成一个新的单据表头 _currentMaster = (YP_OutMaster)(_billProcessor.BuildNewMaster(_currentDeptId, _currentUserId)); _currentMaster.OpType = _opType; _currentOrder = (YP_OutOrder)(_billProcessor.BuildNewoder(_currentDeptId, _currentMaster)); LoadData(); } else if (_currentState == UPDATE) { _currentOrder = (YP_OutOrder)(_billProcessor.BuildNewoder(_currentDeptId, _currentMaster)); LoadData(); dgrdOrderInfo_CurrentCellChanged(null, null); } //显示当前表头信息 ShowCurrentMaster(); }
public FrmYPAdjMaster(long currentUserId, long currentDeptId, string chineseName, string belongSystem) { _currentUserId = currentUserId; _currentDeptId = currentDeptId; _chineseName = chineseName; _belongSystem = belongSystem; if (_belongSystem == ConfigManager.YF_SYSTEM) { _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_ADJPRICE); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_ADJPRICE); } else { _billQuery = BillFactory.GetQuery(ConfigManager.OP_YK_ADJPRICE); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_ADJPRICE); } InitializeComponent(); }
public FrmCheckMaster(long currentUserId, long currentDeptId, string chineseName, string belongSystem) { _currentUserId = currentUserId; _currentDeptId = currentDeptId; _chineseName = chineseName; this.Text = _chineseName; _belongSystem = belongSystem; if (_belongSystem == ConfigManager.YF_SYSTEM) { _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_CHECK); _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_CHECK); } else if (_belongSystem == ConfigManager.YK_SYSTEM) { _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_CHECK); _billQuery = BillFactory.GetQuery(ConfigManager.OP_YK_CHECK); } InitializeComponent(); }
public ActionResult AddPayment(int?roommateId, int?billId, decimal?amountOwed) { HouseHoldViewModel model = new HouseHoldViewModel(); if (roommateId != null && billId != null) { ViewBag.selectedRoommate = RoommateProcessor.GetRoommateById((int)roommateId).FullName; ViewBag.selectedBill = BillProcessor.GetBillById((int)billId).BillName; ViewBag.AmountOwed = amountOwed?.ToString("C", CultureInfo.CurrentCulture); model.Payment.BillId = (int)billId; model.Payment.RoommateId = RoommateProcessor.GetRoommateById((int)roommateId).RoommateId; } else { var billData = BillProcessor.LoadBills(); //var billData = PaymentProcessor.GetUnpaidBills(); var roommateData = RoommateProcessor.LoadRoommates(); foreach (var item in billData) { model.Bills.Add(new Models.BillModel { //ID = item.BillId, ID = item.ID, BillName = item.BillName, Amount = item.AmountDue, DueDate = item.DueDate }); } foreach (var item in roommateData) { model.Roommates.Add(new Models.RoommateModel { RoommateId = item.RoommateId, FirstName = item.FirstName, LastName = item.LastName, MonthlyPayment = item.MonthlyPayment }); } } return(View(model)); }
private void txtOutDept_AfterSelectedRow(object sender, object SelectedValue) { if (txtOutDept.ReadOnly == true) { return; } DataRow dr = (DataRow)SelectedValue; if (dr != null) { //add 平级药房调拨 张运辉 [20100531] if (dr["TYPE_CODE"].ToString() == "002") { _opType = ConfigManager.OP_YF_PJDB; _billProcessor = BillFactory.GetProcessor(_opType); } _currentMaster.OutDeptId = Convert.ToInt32(txtOutDept.MemberValue); } }
private void FrmCheckOrder_Load(object sender, EventArgs e) { try { dgrdCheckOrder.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", (float)9); if (_belongSystem == ConfigManager.YK_SYSTEM) { dgrdCheckOrder.Columns.Remove("AccountNum"); dgrdCheckOrder.Columns.Remove("UnitName"); dgrdCheckOrder.Columns.Remove("CheckNum"); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_CHECK); _billQuery = BillFactory.GetQuery(ConfigManager.OP_YK_CHECK); txtFtPackNum.TextFormat = GWI.HIS.Windows.Controls.TextFormatStyle.Numberic; txtFtBaseNum.ReadOnly = true; } else if (_belongSystem == ConfigManager.YF_SYSTEM) { _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_CHECK); _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_CHECK); dgrdCheckOrder.Columns.Remove("BatchNum"); cobValidityDate.Enabled = false; } if (_currentState == UPDATE) { this.tsrbtnLoadData.Visible = false; this.txtDgCode.ReadOnly = true; this.btnAddOrder.Enabled = false; this.btnDelOrder.Enabled = false; } _checkOrderDt = _billQuery.LoadOrder(_currentMaster); dgrdCheckOrder.DataSource = _checkOrderDt; _drugInfoDt = _storeQuery.GetCheckDrug((int)_currentDeptId); txtDgCode.SetSelectionCardDataSource(_drugInfoDt); txtQueryCode.SetSelectionCardDataSource(_drugInfoDt); ShowCurrentMaster(); } catch (Exception error) { MessageBox.Show(error.Message); } }
private void CreateProcessorBySystem() { if (_belongSystem == ConfigManager.YF_SYSTEM) { _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_INSTORE); _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_INSTORE); this.txtBatchNum.ReadOnly = true; this.chkIsFirstIn.Visible = false; this.txtBaseNum.ReadOnly = false; this.txtDeliverNum.Visible = false; this.lblDeliverNum.Visible = false; this.txtInNum.TextFormat = GWI.HIS.Windows.Controls.TextFormatStyle.Integer; this.btnQuerySupportHis.Visible = false; } else { if (_currentState == ADD) { _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_INOPTYPE); this.chkIsFirstIn.Visible = true; } else if (_currentState == BACK) { _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_BACKSTORE); this.chkIsFirstIn.Visible = false; } else if (_currentState == UPDATE) { if (_currentMaster != null) { _billProcessor = BillFactory.GetProcessor(_currentMaster.OpType); } this.chkIsFirstIn.Visible = (_currentMaster.OpType == ConfigManager.OP_YK_BACKSTORE ? false : true); } _billQuery = BillFactory.GetQuery(ConfigManager.OP_YK_INOPTYPE); this.txtBaseNum.ReadOnly = true; this.txtDeliverNum.Visible = true; this.btnQuerySupportHis.Visible = true; } }
private void FrmAdjOrder_Load(object sender, EventArgs e) { try { if (_belongSystem == ConfigManager.YF_SYSTEM) { _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_ADJPRICE); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YF_ADJPRICE); } else { _billQuery = BillFactory.GetQuery(ConfigManager.OP_YK_ADJPRICE); _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_ADJPRICE); } if (_currentState == ADD) { this._currentOrder = (YP_AdjOrder)(_billProcessor.BuildNewoder(0, _adjMaster)); LoadData(); this.txtNewRetail.Text = "0.00"; this.txtNewTrade.Text = "0.00"; ShowMaster(); this.txtAdjCode.Focus(); this.txtAdjCode.SelectAll(); } else { LoadData(); _currentOrder = (YP_AdjOrder)(_billProcessor.BuildNewoder(0, _adjMaster)); dgrdAdjOrder_CurrentCellChanged(null, null); ShowInQuery(); ShowMaster(); } } catch (Exception error) { MessageBox.Show(error.Message); } }
private void tsrbtnAuditBill_Click(object sender, EventArgs e) { try { this.Cursor = GWMHIS.BussinessLogicLayer.Classes.PublicStaticFun.WaitCursor(); if (ConfigManager.IsChecking(_currentDeptId)) { MessageBox.Show("药品正在盘点中......"); return; } if (_currentMaster == null) { MessageBox.Show("请选中一行"); return; } if (_currentMaster.Audit_Flag == 1) { MessageBox.Show("不能对已审核单据进行操作"); return; } else { _billProcessor = BillFactory.GetProcessor(_currentMaster.OpType); _billProcessor.AuditBill(_currentMaster, _currentUserId, _currentDeptId); MessageBox.Show("审核成功,请及时核查库存..."); LoadData(); } } catch (Exception error) { MessageBox.Show(error.Message); } finally { this.Cursor = DefaultCursor; } }