private void GridDoubleClick(int rowNum, int colNum) { DateTime dtFrom = new DateTime(_yr, _mnth, 1); String dtTo = PLABS.Utils.CnvToDate(dtFrom.AddMonths(1).AddDays(-1)).ToString("yyyy-MM-dd"); String[] parameters = new String[3]; parameters[0] = PLABS.Utils.CnvToStr(this.grd_gldrgtr.Rows[rowNum].Cells["txt_vtyp_gv"].Value); parameters[1] = dtFrom.ToString("yyyy-MM-dd"); parameters[2] = dtTo; //else //{ // parameters[1] = PLABS.Utils.CnvToStr(this.dp_frm.Value.ToString("yyyy-MM-dd")); // parameters[2] = PLABS.Utils.CnvToStr(this.dp_to.Value.ToString("yyyy-MM-dd")); //} if (parameters[0] != "O" && parameters[0] != "CO") { if (parameters[0] == "CI") { CO_005 objpopup = new CO_005(); objpopup.Parameters = parameters; objpopup.Text = PLABS.Utils.CnvToStr(this.grd_gldrgtr.CurrentRow.Cells["txt_stkitm_gv"].Value); objpopup.ShowDialog(); } else if (parameters[0] == "WO" || parameters[0] == "CT") { FL_003 objpopup = new FL_003(); objpopup.Text = PLABS.Utils.CnvToStr(this.grd_gldrgtr.CurrentRow.Cells["txt_stkitm_gv"].Value); objpopup.ShowDialog(); } else if (parameters[0] == "WP") { RP_006 objpopup = new RP_006(); objpopup.Text = PLABS.Utils.CnvToStr(this.grd_gldrgtr.CurrentRow.Cells["txt_stkitm_gv"].Value); objpopup.ShowDialog(); } else if (parameters[0] == "WS") { TD_001 objpopup = new TD_001(); objpopup.Text = PLABS.Utils.CnvToStr(this.grd_gldrgtr.CurrentRow.Cells["txt_stkitm_gv"].Value); objpopup.ShowDialog(); } else { CO_004 objpopup = new CO_004(); objpopup.Parameters = parameters; objpopup.Text = PLABS.Utils.CnvToStr(this.grd_gldrgtr.CurrentRow.Cells["txt_stkitm_gv"].Value); objpopup.ShowDialog(); } } }
private void CellDoubleClick(int rowNum, int colNum) { try { string[] parameters = new string[3]; string colName = this.grd_data.Columns[colNum].Name; string date = PLABS.Utils.CnvToDate(this.grd_data.Rows[rowNum].Cells["txt_date_gv"].Value).ToString("yyyy-MM-dd"); string[] modeAndText = PLABS.Utils.CnvToStr(ht[colName]).Split(','); if (modeAndText.Length > 0) { string mode = modeAndText[0]; string text = modeAndText[1]; parameters[0] = mode; parameters[1] = date; parameters[2] = date; if (mode == "CI") { CO_005 objpopup = new CO_005(); objpopup.Parameters = parameters; objpopup.Text = text; objpopup.ShowDialog(); } else { CO_004 objpopup = new CO_004(); objpopup.Parameters = parameters; objpopup.Text = text; objpopup.ShowDialog(); } } } catch (Exception ex) { } }