//获取销售记录 private void GetSellRecordList() { StructPage.Builder page = new StructPage.Builder() { Pagebegin = pagebegin, Pagesize = pageSize, Fieldname = 0, Order = 0, }; ProductNetOperation.GetSellRecordList(GetSellRecordListResult, page.Build(), this.productId, startTime, endTime); }
//获取库存清单 private void GetStoreList() { StructPage.Builder page = new StructPage.Builder() { Pagebegin = this.pageBegin, Pagesize = this.pageSize, Fieldname = 0, Order = 0, }; ProductNetOperation.GetStoreList(GetStoreListResult, page.Build()); }
//保存/修改 private void simpleButton2_Click(object sender, EventArgs e) { string pname = this.textEdit1.Text; int index = this.comboBoxEdit1.SelectedIndex; string num = textEdit2.Text; string price = textEdit3.Text; string integal = textEdit4.Text; if (index < 0 || pname.Equals("") || num.Equals("") || price.Equals("") || integal.Equals("")) { MessageBox.Show("请完整添加选项"); return; } StructGoods.Builder newProduct; //修改 if (this.product != null) { newProduct = new StructGoods.Builder(this.product); } //添加 else { newProduct = new StructGoods.Builder(); newProduct.GoodsId = 0; } newProduct.GoodsName = pname; newProduct.Category = this.productTypes[index].typeId; newProduct.Count = int.Parse(num); newProduct.Price = price; newProduct.Integal = int.Parse(integal); newProduct.GoodsImg1 = this.productPicture1.NetPath; newProduct.GoodsImg2 = this.productPicture2.NetPath; newProduct.GoodsImg3 = this.productPicture3.NetPath; newProduct.UseIntegal = this.checkedListBoxControl1.Items[0].CheckState == CheckState.Checked; newProduct.Hide = this.checkedListBoxControl1.Items[2].CheckState == CheckState.Checked; // if (this.product != null) { System.Console.WriteLine("newProduct:" + newProduct); ProductNetOperation.UpdateProduct(ProductResult, newProduct.Build()); } //添加 else { ProductNetOperation.AddProduct(ProductResult, newProduct.Build()); } }
//获取销售记录 private void GetProductIndentList() { StructPage.Builder page = new StructPage.Builder() { Pagebegin = pageBegin, Pagesize = pageSize, Fieldname = 0, Order = 0, }; string keyWords = this.buttonEdit1.Text; //1提交 2付款完成 3订单处理完成(发货完成) //"1提交","2完成","3撤销" ProductNetOperation.GetProdcutIndentList(GetProdcutIndentListResult, page.Build(), 2, "", "", "", "", keyWords); }
//删除选中商品 private void simpleButton1_Click(object sender, EventArgs e) { List <int> ids = new List <int>(); for (int i = 0; i < this.mainDataTable.Rows.Count; i++) { StructGoods prodcut = this.products[i]; DataRow row = this.mainDataTable.Rows[i]; if (row[TitleList.Check.ToString()].ToString().Equals("True")) { ids.Add(prodcut.GoodsId); } } if (ids.Count == 0) { return; } ProductNetOperation.DeleteProduct(DeleteProductResult, ids); }
//获取销售记录 private void GetProductIndentList() { StructPage.Builder page = new StructPage.Builder() { Pagebegin = pageBegin, Pagesize = pageSize, Fieldname = 0, Order = 0, }; string keyWords = null; if (!this.buttonEdit1.Text.Equals(this.buttonEdit1.Properties.NullText)) { keyWords = this.buttonEdit1.Text; } int status = this.comboBoxEdit1.SelectedIndex + 1; ProductNetOperation.GetProdcutIndentList(GetProdcutIndentListResult, page.Build(), status, addStart, addEnd, handleStart, handleEnd, keyWords); }
public void ColumnButtonClick(object sender, ButtonPressedEventArgs e) { int rowhandle = this.gridView1.FocusedRowHandle; StructGoods product = this.products[rowhandle]; DataRow row = this.gridView1.GetDataRow(rowhandle); String tag = (String)e.Button.Tag; String[] param = tag.Split('_'); //查看销售记录 if (param[0].Equals(TitleList.SellRecord.ToString())) { ProductSellRecordView view = new ProductSellRecordView(product.GoodsId); MainViewManage.ShowSecondView(view); } else if (param[0].Equals(TitleList.Operation.ToString())) { //修改信息 if (param[1].Equals("0")) { ProductAddView view = new ProductAddView(product); CloseFormHandle close = new CloseFormHandle(delegate { this.mainDataTable.Clear(); GetProductList(); }); ToolsManage.ShowForm(view, false, close); } //删除 else { List <int> ids = new List <int>() { product.GoodsId, }; ProductNetOperation.DeleteProduct(DeleteProductResult, ids); } } }
private void GetProductList() { Int32 category = -1; if (this.comboBoxEdit1.SelectedIndex > 0) { category = this.productTypes[this.comboBoxEdit1.SelectedIndex - 1].typeId; } string keyWords = ""; if (!this.buttonEdit1.Text.Equals(this.buttonEdit1.Properties.NullText)) { keyWords = this.buttonEdit1.Text; } StructPage.Builder page = new StructPage.Builder() { Pagesize = pageSize, Pagebegin = pageBegin, Fieldname = 0, Order = 0, }; ProductNetOperation.GetProductList(GetProductListResult, page.Build(), category, keyWords); }
//Get Order Info private void GetProductIndentDetail() { ProductNetOperation.GetProdcutIndentDetail(GetProdcutIndentDetailResult, this.order.Orderid); }
//点击完成 private void simpleButton1_Click(object sender, EventArgs e) { //进行订单完成 ProductNetOperation.HandleProductIndent(HandleProductIndentResult, order.Orderid); }