/// <summary>
 /// Update a AcOtherShouldCollectionDetail.
 /// </summary>
 public void Update(Model.AcOtherShouldCollectionDetail acOtherShouldCollectionDetail)
 {
     //
     // todo: add other logic here.
     //
     accessor.Update(acOtherShouldCollectionDetail);
 }
 /// <summary>
 /// Insert a AcOtherShouldCollectionDetail.
 /// </summary>
 public void Insert(Model.AcOtherShouldCollectionDetail acOtherShouldCollectionDetail)
 {
     //
     // todo:add other logic here
     //
     accessor.Insert(acOtherShouldCollectionDetail);
 }
Esempio n. 3
0
 private void simpleButtonA_Click(object sender, EventArgs e)
 {
     // Model.AcOtherShouldCollection  acotherShouledColl= new Model.AcOtherShouldCollection();
     //this.AcOtherShouldCollection.Details = new List<Model.AcOtherShouldCollectionDetail>();
     //if (this.action == "insert")
     //{
     Model.AcOtherShouldCollectionDetail detail = new Model.AcOtherShouldCollectionDetail();
     detail.AcOtherShouldCollectionId = this.AcOtherShouldCollection.AcOtherShouldCollectionId;
     this.AcOtherShouldCollection.Details.Add(detail);
     this.gridControl1.RefreshDataSource();
     this.bindingSource1.Position = this.bindingSource1.IndexOf(detail);
     //}
     // this.Refresh();
 }
Esempio n. 4
0
        private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            if (e.Column == this.colAcMoney)
            {
                Model.AcOtherShouldCollectionDetail CurrentDetail = this.AcOtherShouldCollection.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.AcMoney = this.GetDecimal(CurrentDetail.AcMoney.HasValue ? CurrentDetail.AcMoney.Value : 0, BL.V.SetDataFormat.CGJEXiao.Value);

                CurrentDetail.TaxCalualateDictionary = new global::Helper.TaxCalculateHelper(t, mInvoiceTaxrate.Value, mInvoiceTaxrate.Value, CurrentDetail.AcMoney.Value, 1).TaxCalculateDictionary;
                this.CalculateMoney();

                this.gridControl1.RefreshDataSource();
            }
        }
Esempio n. 5
0
 protected override void AddNew()
 {
     this.AcOtherShouldCollection = new Model.AcOtherShouldCollection();
     this.AcOtherShouldCollection.AcOtherShouldCollectionId   = this.AcOtherShouldCollectionManager.GetId();
     this.AcOtherShouldCollection.AcOtherShouldCollectionDate = DateTime.Now;
     this.AcOtherShouldCollection.TaxCaluType = 0;
     this.AcOtherShouldCollection.Details     = new List <Model.AcOtherShouldCollectionDetail>();
     this.AcOtherShouldCollection.Employee    = BL.V.ActiveOperator.Employee;
     if (this.action == "insert")
     {
         Model.AcOtherShouldCollectionDetail detail = new Model.AcOtherShouldCollectionDetail();
         detail.AcOtherShouldCollectionId = this.AcOtherShouldCollection.AcOtherShouldCollectionId;
         this.AcOtherShouldCollection.Details.Add(detail);
         this.bindingSource1.Position = this.bindingSource1.IndexOf(detail);
     }
 }
Esempio n. 6
0
        private void simpleButtonJ_Click(object sender, EventArgs e)
        {
            if (this.bindingSource1.Current != null)
            {
                this.AcOtherShouldCollection.Details.Remove(this.bindingSource1.Current as Book.Model.AcOtherShouldCollectionDetail);

                if (this.AcOtherShouldCollection.Details.Count == 0)
                {
                    Model.AcOtherShouldCollectionDetail detail = new Model.AcOtherShouldCollectionDetail();
                    this.AcOtherShouldCollection.Details.Add(detail);
                    this.bindingSource1.Position  = this.bindingSource1.IndexOf(detail);
                    this.calcZongEMoney.EditValue = 0;
                }
                else
                {
                    this.gridControl1.RefreshDataSource();
                    this.CalculateMoney();
                }

                this.gridControl1.RefreshDataSource();
            }
        }
Esempio n. 7
0
 public void Update(Model.AcOtherShouldCollectionDetail e)
 {
     this.Update <Model.AcOtherShouldCollectionDetail>(e);
 }
Esempio n. 8
0
 public void Insert(Model.AcOtherShouldCollectionDetail e)
 {
     this.Insert <Model.AcOtherShouldCollectionDetail>(e);
 }