/// <summary> /// Update a AcOtherShouldPaymentDetail. /// </summary> public void Update(Model.AcOtherShouldPaymentDetail acOtherShouldPaymentDetail) { // // todo: add other logic here. // accessor.Update(acOtherShouldPaymentDetail); }
/// <summary> /// Insert a AcOtherShouldPaymentDetail. /// </summary> public void Insert(Model.AcOtherShouldPaymentDetail acOtherShouldPaymentDetail) { // // todo:add other logic here // accessor.Insert(acOtherShouldPaymentDetail); }
private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { if (e.Column == this.colAcItemPrice || e.Column == this.colAcQuantity) { Model.AcOtherShouldPaymentDetail CurrentDetail = this.AcOtherShouldPayment.Details[e.RowHandle]; double?mInvoiceTaxrate = (calcTaxRate.EditValue == null || string.IsNullOrEmpty(this.calcTaxRate.EditValue.ToString())) ? 0 : double.Parse(this.calcTaxRate.EditValue.ToString()); global::Helper.TaxType t = (Helper.TaxType) this.TaxType.SelectedIndex; CurrentDetail.AcItemPrice = this.GetDecimal((CurrentDetail.AcItemPrice.HasValue ? CurrentDetail.AcItemPrice.Value : 0), BL.V.SetDataFormat.CGDJXiao.Value); //CurrentDetail.AcQuantity = this.GetDecimal(CurrentDetail.AcQuantity.HasValue ? CurrentDetail.AcQuantity.Value : 0, BL.V.SetDataFormat.CGSLXiao.Value); CurrentDetail.AcMoney = this.GetDecimal(CurrentDetail.AcItemPrice.Value * CurrentDetail.AcQuantity.Value, BL.V.SetDataFormat.CGJEXiao.Value); if (CurrentDetail.AcQuantity.HasValue && CurrentDetail.AcQuantity.Value > 0) { CurrentDetail.TaxCalualateDictionary = new global::Helper.TaxCalculateHelper(t, mInvoiceTaxrate.Value, mInvoiceTaxrate.Value, CurrentDetail.AcMoney.Value, CurrentDetail.AcQuantity.Value).TaxCalculateDictionary; this.CalculateMoney(); } this.gridControl1.RefreshDataSource(); //this.CalcHeJI(); } if (e.Column == this.colLoanName) { Model.AcOtherShouldPaymentDetail CurrentDetail = this.AcOtherShouldPayment.Details[e.RowHandle]; IList <Model.AcItem> acilist = (from Model.AcItem ac in acitemlist where ac.ItemName == CurrentDetail.LoanName select ac).ToList <Model.AcItem>(); if (acilist != null && acilist.Count != 0) { Model.AcItem aci = acilist.First <Model.AcItem>(); CurrentDetail.AcItemId = aci.AcItemId; CurrentDetail.AcItem = aci; CurrentDetail.LoanName = aci.ItemName; double?mInvoiceTaxrate = (calcTaxRate.EditValue == null || string.IsNullOrEmpty(this.calcTaxRate.EditValue.ToString())) ? 0 : double.Parse(this.calcTaxRate.EditValue.ToString()); global::Helper.TaxType t = (Helper.TaxType) this.TaxType.SelectedIndex; CurrentDetail.AcItemPrice = this.GetDecimal(aci.ItemPrice.HasValue ? aci.ItemPrice.Value : 0, BL.V.SetDataFormat.CGDJXiao.Value); //CurrentDetail.AcQuantity = this.GetDecimal(CurrentDetail.AcQuantity.HasValue ? CurrentDetail.AcQuantity.Value : 0, BL.V.SetDataFormat.CGSLXiao.Value); CurrentDetail.AcMoney = this.GetDecimal(CurrentDetail.AcItemPrice.Value * CurrentDetail.AcQuantity.Value, BL.V.SetDataFormat.CGJEXiao.Value); if (CurrentDetail.AcQuantity.HasValue && CurrentDetail.AcQuantity.Value > 0) { CurrentDetail.TaxCalualateDictionary = new global::Helper.TaxCalculateHelper(t, mInvoiceTaxrate.Value, mInvoiceTaxrate.Value, CurrentDetail.AcMoney.Value, CurrentDetail.AcQuantity.Value).TaxCalculateDictionary; this.CalculateMoney(); } this.gridControl1.RefreshDataSource(); } else { CurrentDetail = new Book.Model.AcOtherShouldPaymentDetail(); CurrentDetail.AcItemPrice = 0; CurrentDetail.AcMoney = 0; CurrentDetail.AcQuantity = 0; this.gridControl1.RefreshDataSource(); } } }
public void Update(Model.AcOtherShouldPaymentDetail e) { this.Update <Model.AcOtherShouldPaymentDetail>(e); }
public void Insert(Model.AcOtherShouldPaymentDetail e) { this.Insert <Model.AcOtherShouldPaymentDetail>(e); }