Ejemplo n.º 1
0
 protected override void ShowSearchForm()
 {
     Query.ConditionCOChooseForm f = new Query.ConditionCOChooseForm();
     if (f.ShowDialog(this) == DialogResult.OK)
     {
         Query.ConditionCO con = f.Condition as Query.ConditionCO;
         this.bindingSource1.DataSource = ((BL.InvoiceCGManager) this.invoiceManager).Select(con.COStartId, con.COEndId, con.SupplierStart, con.SupplierEnd, (DateTime)con.StartInvoiceDate, (DateTime)con.EndInvoiceDate, con.ProductStart, con.ProductEnd, con.CusXOId, con.StartJHDate, con.EndJHDate, con.InvoiceCGIdStart, con.InvoiceCGIdEnd);
         foreach (Model.InvoiceCG model in (this.bindingSource1.DataSource) as IList <Model.InvoiceCG> )
         {
             //if (model.InvoiceCOId == null)
             //{
             model.DetailCOId = (new BL.InvoiceCGDetailManager()).SelectByInvoiceId(model.InvoiceId);
             //}
             if (model.DetailCOId != null)
             {
                 model.InvoiceCOJHDate = this.comanager.GetInvoiceYjrq(model.DetailCOId);
             }
         }
         this.barStaticItem1.Caption = string.Format("{0}Items", this.bindingSource1.Count);
     }
     else
     {
         this.Dispose();
         this.Close();
     }
     f.Dispose();
     GC.Collect();
 }
Ejemplo n.º 2
0
 protected override void ShowSearchForm()
 {
     Query.ConditionCOChooseForm f = new Query.ConditionCOChooseForm();
     if (f.ShowDialog(this) == DialogResult.OK)
     {
         Query.ConditionCO con = f.Condition as Query.ConditionCO;
         this.bindingSource1.DataSource = ((BL.InvoiceCOManager) this.invoiceManager).SelectDateRangAndWhere(con.COStartId, con.COEndId, con.SupplierStart, con.SupplierEnd, con.StartDate, con.EndDate, con.ProductStart, con.ProductEnd, con.CusXOId, con.StartJHDate, con.EndJHDate, con.InvoiceFlag.Value);
     }
     f.Dispose();
     GC.Collect();
 }
Ejemplo n.º 3
0
 private void simpleButton_Search_Click(object sender, EventArgs e)
 {
     Query.ConditionCOChooseForm f = new Query.ConditionCOChooseForm();
     if (f.ShowDialog(this) == DialogResult.OK)
     {
         Query.ConditionCO con = f.Condition as Query.ConditionCO;
         this.dateEdit1.DateTime        = con.StartDate;
         this.dateEdit2.DateTime        = con.EndDate;
         this.bindingSource1.DataSource = invoiceCOManager.SelectDateRangAndWhere(con.COStartId, con.COEndId, con.SupplierStart, con.SupplierEnd, con.StartDate, con.EndDate, con.ProductStart, con.ProductEnd, con.CusXOId, con.StartJHDate, con.EndJHDate, con.InvoiceFlag.Value);
         bandDetail();
     }
     f.Dispose();
     GC.Collect();
 }
Ejemplo n.º 4
0
 protected override void ShowSearchForm()
 {
     Query.ConditionCOChooseForm f = new Query.ConditionCOChooseForm();
     if (f.ShowDialog(this) == DialogResult.OK)
     {
         Query.ConditionCO con = f.Condition as Query.ConditionCO;
         this.bindingSource1.DataSource = ((BL.InvoiceCGManager) this.invoiceManager).Select(con.COStartId, con.COEndId, con.SupplierStart, con.SupplierEnd, con.StartDate, con.EndDate, con.ProductStart, con.ProductEnd, con.CusXOId, con.StartJHDate, con.EndJHDate);
         foreach (Model.InvoiceCG model in (this.bindingSource1.DataSource) as IList <Model.InvoiceCG> )
         {
             if (model.InvoiceCOId == null)
             {
                 model.DetailCOId = (new BL.InvoiceCGDetailManager()).SelectByInvoiceId(model.InvoiceId);
             }
         }
     }
     f.Dispose();
     GC.Collect();
 }
Ejemplo n.º 5
0
        //更改查询周期
        private void btnChangeSearch_Click(object sender, EventArgs e)
        {
            Query.ConditionCOChooseForm f = new Query.ConditionCOChooseForm();
            if (f.ShowDialog(this) == DialogResult.OK)
            {
                Query.ConditionCO con = f.Condition as Query.ConditionCO;
                this.dateEditStart.DateTime = Convert.ToDateTime(con.StartInvoiceDate);
                this.dateEditEnd.DateTime   = Convert.ToDateTime(con.EndInvoiceDate);

                this.bsHeader.DataSource = this._mInvoiceCGManager.Select(con.COStartId, con.COEndId, con.SupplierStart, con.SupplierEnd, Convert.ToDateTime(con.StartInvoiceDate), Convert.ToDateTime(con.EndInvoiceDate), con.ProductStart, con.ProductEnd, con.CusXOId, con.StartJHDate, con.EndJHDate, con.InvoiceCGIdStart, con.InvoiceCGIdEnd);
                if (this.bsHeader.Current != null)
                {
                    Model.InvoiceCG icg = this.bsHeader.Current as Model.InvoiceCG;
                    IList <Model.InvoiceCGDetail> icgd = _mInvoiceCGDetailManager.Select(icg);
                    (this.bsHeader.Current as Model.InvoiceCG).Details = icgd;
                    //this.SelectAll((this.bsHeader.Current as Model.InvoiceCG).Details);
                    this.bindingSource1.DataSource = (this.bsHeader.Current as Model.InvoiceCG).Details;
                }
            }
            f.Dispose();
            GC.Collect();
        }