private void IsBtnSave() { model = bll.GetModel(App_Code.Canshu.Id); if (model != null) { decimal money = model.Money; decimal invoicem = model.InvoiceMoney; if (money == invoicem) { this.btnSave.Enabled = false; this.txtInvoiceno.ReadOnly = true; this.txtTic.ReadOnly = true; this.cbxPayment.Enabled = false; this.txtHandling.ReadOnly = true; this.cbxStatus.Enabled = false; this.txtRemark.ReadOnly = true; this.txtInvoiceMoney.ReadOnly = true; } } }
/// <summary> /// 查询信息 /// </summary> /// <param name="id"></param> private void ShowInvoice(int id) { model = bll.GetModel(id); this.txtB.Text = model.B; this.txtContractno.Text = model.ContractNo; this.txtDemoname.Text = model.DemoName; if (!string.IsNullOrEmpty(model.EmpName)) { this.cbxEmp.Text = model.EmpName; } else { this.txtTic.ReadOnly = true; } this.txtMoney.Text = model.Money.ToString(); if (!string.IsNullOrEmpty(model.InvoiceMoney.ToString()) && model.InvoiceMoney > 0) { this.txtOpenMoney.Text = model.InvoiceMoney.ToString(); } }