private void ShowForm(int type, CostumeStoreChangeInfo item) { if (type == CommonInformationTypes.GetCostumeStoreChange4In) { //采购进货明细 CostumeStoreTrackSearchInForm form = new CostumeStoreTrackSearchInForm(); // this.InboundDetailClick?.Invoke(item.In, this, this.skinSplitContainer1.Panel2); GetCostumeStoreChangePara changePara = new GetCostumeStoreChangePara(); ReflectionHelper.CopyProperty(pagePara, changePara); changePara.StartDate = JGNet.Core.Tools.TimeHelper.GetReportDate(item.Date.ToString()); changePara.EndDate = changePara.StartDate; form.ShowDialog(changePara); } else if (type == CommonInformationTypes.GetCostumeStoreChange4Into) { //调拨单明细 CostumeStoreTrackSearchIntoForm form = new CostumeStoreTrackSearchIntoForm(); GetCostumeStoreChangePara changePara = new GetCostumeStoreChangePara(); ReflectionHelper.CopyProperty(pagePara, changePara); changePara.StartDate = JGNet.Core.Tools.TimeHelper.GetReportDate(item.Date.ToString()); changePara.EndDate = changePara.StartDate; form.ShowDialog(changePara); } else if (type == CommonInformationTypes.GetCostumeStoreChange4Return) { CostumeStoreTrackSearchReturnForm form = new CostumeStoreTrackSearchReturnForm(); GetCostumeStoreChangePara changePara = new GetCostumeStoreChangePara(); ReflectionHelper.CopyProperty(pagePara, changePara); changePara.StartDate = JGNet.Core.Tools.TimeHelper.GetReportDate(item.Date.ToString()); changePara.EndDate = changePara.StartDate; form.ShowDialog(changePara); } else if (type == CommonInformationTypes.GetCostumeStoreChange4TurnOut) { CostumeStoreTrackSearchTurnOutForm form = new CostumeStoreTrackSearchTurnOutForm(); GetCostumeStoreChangePara changePara = new GetCostumeStoreChangePara(); ReflectionHelper.CopyProperty(pagePara, changePara); changePara.StartDate = JGNet.Core.Tools.TimeHelper.GetReportDate(item.Date.ToString()); changePara.EndDate = changePara.StartDate; form.ShowDialog(changePara); } else if (type == CommonInformationTypes.GetCostumeStoreChange4Retail) { CostumeStoreTrackSearchRetailForm form = new CostumeStoreTrackSearchRetailForm(); GetCostumeStoreChangePara changePara = new GetCostumeStoreChangePara(); ReflectionHelper.CopyProperty(pagePara, changePara); changePara.StartDate = JGNet.Core.Tools.TimeHelper.GetReportDate(item.Date.ToString()); changePara.EndDate = changePara.StartDate; form.ShowDialog(changePara); } else if (type == CommonInformationTypes.GetCostumeStoreChange4Scrap) { CostumeStoreTrackSearchScrapForm form = new CostumeStoreTrackSearchScrapForm(); GetCostumeStoreChangePara changePara = new GetCostumeStoreChangePara(); ReflectionHelper.CopyProperty(pagePara, changePara); changePara.StartDate = JGNet.Core.Tools.TimeHelper.GetReportDate(item.Date.ToString()); changePara.EndDate = changePara.StartDate; form.ShowDialog(changePara); } else if (type == CommonInformationTypes.GetCostumeStoreChange4Profit) { CostumeStoreTrackSearchProfitForm form = new CostumeStoreTrackSearchProfitForm(); GetCostumeStoreChangePara changePara = new GetCostumeStoreChangePara(); ReflectionHelper.CopyProperty(pagePara, changePara); changePara.StartDate = JGNet.Core.Tools.TimeHelper.GetReportDate(item.Date.ToString()); changePara.EndDate = changePara.StartDate; form.ShowDialog(changePara); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (!DataGridViewUtil.CheckPerrmisson(this, sender, e)) { return; } if (e.RowIndex < 0 || e.ColumnIndex < 0) { return; } try { List <CostumeStoreChangeInfo> list = DataGridViewUtil.BindingListToList <CostumeStoreChangeInfo>(dataGridView1.DataSource); CostumeStoreChangeInfo item = (CostumeStoreChangeInfo)list[e.RowIndex]; if (e.ColumnIndex == inDataGridViewTextBoxColumn.Index || e.ColumnIndex == intoDataGridViewTextBoxColumn.Index || e.ColumnIndex == returnDataGridViewTextBoxColumn.Index || e.ColumnIndex == turnOutDataGridViewTextBoxColumn.Index || e.ColumnIndex == retailDataGridViewTextBoxColumn.Index || e.ColumnIndex == scrapDataGridViewTextBoxColumn.Index || e.ColumnIndex == profitDataGridViewTextBoxColumn.Index) { int type = 0; if (e.ColumnIndex == inDataGridViewTextBoxColumn.Index) { type = CommonInformationTypes.GetCostumeStoreChange4In; } else if (e.ColumnIndex == intoDataGridViewTextBoxColumn.Index) { type = CommonInformationTypes.GetCostumeStoreChange4Into; } else if (e.ColumnIndex == returnDataGridViewTextBoxColumn.Index) { type = CommonInformationTypes.GetCostumeStoreChange4Return; } else if (e.ColumnIndex == turnOutDataGridViewTextBoxColumn.Index) { type = CommonInformationTypes.GetCostumeStoreChange4TurnOut; } else if (e.ColumnIndex == retailDataGridViewTextBoxColumn.Index) { type = CommonInformationTypes.GetCostumeStoreChange4Retail; } else if (e.ColumnIndex == scrapDataGridViewTextBoxColumn.Index) { type = CommonInformationTypes.GetCostumeStoreChange4Scrap; } else if (e.ColumnIndex == profitDataGridViewTextBoxColumn.Index) { type = CommonInformationTypes.GetCostumeStoreChange4Profit; } ShowForm(type, item); //this.DetailClick?.Invoke(type, item, this); } } catch (Exception ee) { CommonGlobalUtil.ShowError(ee); } }