void tmiAddFish_Click(object sender, EventArgs e) { //OnClickFish(); FormNewFish form = new FormNewFish(); form.ShowDialog(); }
private void SeeFishDetail(int colidx, int rowidx) { if (colidx < 0 || rowidx < 0) { return; } if (dataGridView1.Columns[colidx].Name.Equals("code")) { string productidStr = dataGridView1.Rows[rowidx].Cells["code"].Value.ToString(); FormNewFish form = new FormNewFish(productidStr); form.MenuCode = "M007"; form.ShowDialog(); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex < 0 && e.RowIndex < 0) { this.DialogResult = DialogResult.Cancel; } if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("fishId", StringComparison.OrdinalIgnoreCase) == true) { if (dataGridView1.Rows[e.RowIndex].Cells["fishId"].Value.ToString() == "") { } FormNewFish from = new FormNewFish(dataGridView1.Rows[e.RowIndex].Cells["fishId"].Value.ToString()); from.ShowDialog(); } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code", StringComparison.OrdinalIgnoreCase) == true) { FormQuotationPriceList from = new FormQuotationPriceList(dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString()); from.ShowDialog(); } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code", StringComparison.OrdinalIgnoreCase) != true && dataGridView1.Columns[e.ColumnIndex].Name.Equals("fishId", StringComparison.OrdinalIgnoreCase) != true) { _model = new FishEntity.QuotationPriceListEntity(); _model.fishId = dataGridView1.Rows[e.RowIndex].Cells["fishId"].Value.ToString(); if (_model.fishId == "") { _model.XNfishId = dataGridView1.Rows[e.RowIndex].Cells["XNfishId"].Value.ToString(); } if (dataGridView1.Rows[e.RowIndex].Cells["price"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["price"].Value.ToString() != "") { _model.price = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["price"].Value.ToString()); } _model.country = dataGridView1.Rows[e.RowIndex].Cells["country"].Value.ToString(); _model.brand = dataGridView1.Rows[e.RowIndex].Cells["brand"].Value.ToString(); _model.qualitySpe = dataGridView1.Rows[e.RowIndex].Cells["qualitySpe"].Value.ToString(); _model.protein = dataGridView1.Rows[e.RowIndex].Cells["protein"].Value.ToString(); _model.tvn = dataGridView1.Rows[e.RowIndex].Cells["tvn"].Value.ToString(); _model.histamine = dataGridView1.Rows[e.RowIndex].Cells["histamine"].Value.ToString(); _model.FFA = dataGridView1.Rows[e.RowIndex].Cells["ffa"].Value.ToString(); _model.acid = dataGridView1.Rows[e.RowIndex].Cells["acid"].Value.ToString(); _model.ash = dataGridView1.Rows[e.RowIndex].Cells["ash"].Value.ToString(); _model.salt = dataGridView1.Rows[e.RowIndex].Cells["salt"].Value.ToString(); _model.las = dataGridView1.Rows[e.RowIndex].Cells["las"].Value.ToString(); _model.das = dataGridView1.Rows[e.RowIndex].Cells["das"].Value.ToString(); _model.code = dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString(); this.DialogResult = DialogResult.OK; } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0 || e.ColumnIndex < 0) { return; } path = string.Empty; Megres.oddNum = string.Empty; if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("createUser", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("采购申请单") == true) { path = "FishClient.FormPurchaseApplication"; Megres.oddNum = dataGridView1.Rows[e.RowIndex].Cells["codeNum"].Value.ToString(); } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("createUser1", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("采购合同") == true) { path = "FishClient.FormPurcurementContract"; Megres.oddNum = dataGridView1.Rows[e.RowIndex].Cells["codeNum"].Value.ToString(); } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("fishId", StringComparison.OrdinalIgnoreCase))//fishId { if (Authority.ProcessControText("鱼粉资料") == true) { FormNewFish fish = new FormNewFish(dataGridView1.Rows[e.RowIndex].Cells["fishId"].Value.ToString()); fish.Show(); } } if (!string.IsNullOrEmpty(path)) { Reflected(path); } }
private void txtfishId_DoubleClick(object sender, EventArgs e) { //FormWarehouseReceipt form = new FormWarehouseReceipt ( ); //if ( form . ShowDialog ( ) == DialogResult . OK ) //{ // FishEntity . WarehouseReceiptEntity model = form . getModel; // if ( model == null ) // return; // txtfishId . Text = model . fishId; // txtjcCode . Text = model . code; // txtcodeNum . Text = model . codeNum; // txtliWeight . Text = model . weight . ToString ( ); // txtcodeNumContract . Text = model . codeNumContract; // txtprice . Text = model . price . ToString ( ); // txtsupply . Text = model . shipMentUser; // txtshipName . Text = model . shipName; //} //FormPriWarehouse form = new FormPriWarehouse(); //if (form.ShowDialog() == DialogResult.OK) //{ // FishEntity.QuotationPriceListEntity model = form.getModel; // if (model == null) // return; // txtfishId.Text = model.fishId; // //txtjcCode . Text = model . code; // txtcodeNum.Text = model.code; // txtliWeight.Text = model.weight.ToString(); // txtcodeNumContract.Text = model.CodeNumSales; // txtprice.Text = model.price.ToString(); // //txtsupply . Text = model . shipMentUser; // txtshipName.Text = model.ShipName; //} FormNewFish from = new FormNewFish(txtfishId.Text); from.Show(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { billNum = string.Empty; path = string.Empty; if (e.RowIndex < 0 || e.ColumnIndex < 0) { return; } if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("createman", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("销售申请单") == true) { path = "FishClient.FormSalesRequisition"; billNum = dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString(); } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("createman2", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("现货销售合同") == true) { path = "FishClient.FormSalesRContract"; billNum = dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString(); } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("product_id", StringComparison.OrdinalIgnoreCase))//product_id { if (Authority.ProcessControText("鱼粉资料") == true) { FormNewFish fish = new FormNewFish(dataGridView1.Rows[e.RowIndex].Cells["product_id"].Value.ToString()); fish.Show(); } } if (!string.IsNullOrEmpty(path)) { Reflected(path); } }
private void dataGridView1_CellClick(object sender, System.Windows.Forms.DataGridViewCellEventArgs e) { billNum = string.Empty; path = string.Empty; if (e.RowIndex < 0 || e.ColumnIndex < 0) { return; } if (dataGridView1.Columns [e.ColumnIndex].Name.Equals("createman", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("销售申请单") == true) { path = "FishClient.FormSalesRequisition"; billNum = dataGridView1.Rows [e.RowIndex].Cells ["Numbering"].Value.ToString( ); } } else if (dataGridView1.Columns [e.ColumnIndex].Name.Equals("createman2", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("现货销售合同") == true) { path = "FishClient.FormSalesRContract"; billNum = dataGridView1.Rows [e.RowIndex].Cells ["Numbering"].Value.ToString( ); } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("product_id", StringComparison.OrdinalIgnoreCase))//product_id { if (Authority.ProcessControText("鱼粉资料") == true) { FormNewFish fish = new FormNewFish(dataGridView1.Rows[e.RowIndex].Cells["product_id"].Value.ToString()); fish.Show(); } } else if (dataGridView1.Columns [e.ColumnIndex].Name.Equals("coun", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("付款申请单") == true) { if (PaymentTabie == null || PaymentTabie.IsDisposed) { PaymentTabie = new FormPaymentTabie(dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString(), "X"); PaymentTabie.Show();//未打开,直接打开。 } else { PaymentTabie.Activate();//已打开,获得焦点,置顶。 } } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("Numbering2", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("出库单") == true) { //出库单表 if (OutboundTable == null || OutboundTable.IsDisposed) { OutboundTable = new FormOutboundAssociation(dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString()); OutboundTable.Show();//未打开,直接打开。 } else { OutboundTable.Activate();//已打开,获得焦点,置顶。 } } } else if (dataGridView1.Columns [e.ColumnIndex].Name.Equals("Numbering3", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("磅单") == true) { //磅单表 if (BillofladingTable == null || BillofladingTable.IsDisposed) { BillofladingTable = new FormOnepoundTable(dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString(), true); BillofladingTable.Show();//未打开,直接打开。 } else { BillofladingTable.Activate();//已打开,获得焦点,置顶。 } } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("Numbering4", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("货物反馈单") == true) { //TODO:此处改成货物反馈表 if (CargoFeedbackSheetTable == null || CargoFeedbackSheetTable.IsDisposed) { CargoFeedbackSheetTable = new FormCargoFeedbackSheetTable(dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString()); CargoFeedbackSheetTable.Show();//未打开,直接打开。 } else { CargoFeedbackSheetTable.Activate();//已打开,获得焦点,置顶。 } } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("Numbering5", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("公司问题反馈单") == true) { //TODO:此处改成问题反馈表 if (Theproblemsheet == null || Theproblemsheet.IsDisposed) { Theproblemsheet = new FormTheproblemsheetTable(dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString()); Theproblemsheet.Show();//未打开,直接打开。 } else { Theproblemsheet.Activate();//已打开,获得焦点,置顶。 } } } else if (dataGridView1.Columns [e.ColumnIndex].Name.Equals("code3", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("退货单") == true) { //退货表 if (ReturnTable == null || ReturnTable.IsDisposed) { ReturnTable = new FormReturnAssociation(dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString()); ReturnTable.Show();//未打开,直接打开。 } else { ReturnTable.Activate();//已打开,获得焦点,置顶。 } } } else if (dataGridView1.Columns [e.ColumnIndex].Name.Equals("Numbering6", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("收款记录单") == true) { FormReceiptRecordtable ReceiptRecordtable = null; if (ReceiptRecordtable == null || ReceiptRecordtable.IsDisposed) { ReceiptRecordtable = new FormReceiptRecordtable(dataGridView1.Rows[e.RowIndex].Cells["Numbering"].Value.ToString()); ReceiptRecordtable.Show();//未打开,直接打开。 } else { ReceiptRecordtable.Activate();//已打开,获得焦点,置顶。 } } } if (!string.IsNullOrEmpty(path)) { Reflected(path); } }