private void btn_Search_Click(object sender, EventArgs e) { this.dt = stockManager.SelectProductNoDepotout(Convert.ToDouble(this.txt_Years.Text == "" ? null : this.txt_Years.Text), (this.newChooseContorl1.EditValue as Model.ProductCategory) == null ? null : (this.newChooseContorl1.EditValue as Model.ProductCategory).ProductCategoryId); //GetLastDepotoutDate(this.dt); this.bindingSource1.DataSource = dt; this.label1.Text = this.bindingSource1.Count.ToString() + " 項"; this.year = Convert.ToDouble(this.txt_Years.Text == "" ? null : this.txt_Years.Text); }
public NoDepotOutProducts() { InitializeComponent(); //this.gridView1.GroupPanelText = "默認顯示一年未出倉的商品"; this.dt = stockManager.SelectProductNoDepotout(Convert.ToDouble(1)); GetLastDepotoutDate(this.dt); this.bindingSource1.DataSource = dt; this.label1.Text = this.bindingSource1.Count.ToString() + " Items"; if (BL.Settings.NoDepotOutProducts == "1") { this.checkEdit1.Checked = true; } else { this.checkEdit1.Checked = false; } this.StartPosition = FormStartPosition.CenterScreen; this.year = 1; }
private void btn_Search_Click(object sender, EventArgs e) { this.dt = stockManager.SelectProductNoDepotout(Convert.ToDouble(this.txt_Years.Text == "" ? null : this.txt_Years.Text), (this.newChooseContorl1.EditValue as Model.ProductCategory) == null ? null : (this.newChooseContorl1.EditValue as Model.ProductCategory).ProductCategoryId); //GetLastDepotoutDate(this.dt); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow item in dt.Rows) { item["LastDepotInDate"] = stockManager.GetLastDepotInDate(item["productid"].ToString()); } } this.bindingSource1.DataSource = dt; this.label1.Text = this.bindingSource1.Count.ToString() + " 項"; this.year = Convert.ToDouble(this.txt_Years.Text == "" ? null : this.txt_Years.Text); }