protected void GridView_Defect_RadioSelect(object sender, EventArgs e) { RadioButton linkb = (RadioButton)sender; GridViewRow row = (GridViewRow)linkb.NamingContainer; if (row != null && row.RowIndex != -1) { GridView_Incoming_Defects.SelectRow(row.RowIndex); } }
protected void LinkButton_Assgn_To_Command(object sender, CommandEventArgs e) { LinkButton linkb = (LinkButton)sender; GridViewRow row = (GridViewRow)linkb.NamingContainer; if (row != null && row.RowIndex != -1 && row.RowIndex != GridView_Incoming_Defects.SelectedIndex) { GridView_Incoming_Defects.SelectRow(row.RowIndex); } ((RadioButton)GridView_Incoming_Defects.SelectedRow.Cells[0].FindControl("incm_radio")).Checked = true; String forwardString = "/Pages/DispUserDetails.aspx"; //window.open('Popups/Sale/AllPotn_NDA.aspx','DispNDAPot','status=1,toolbar=1,width=500,height=200,left=500,right=500',true); String userId = ((LinkButton)GridView_Incoming_Defects.SelectedRow.Cells[0].FindControl("LinkButton_Assgn_To")).Text; forwardString += "?userId=" + userId; ScriptManager.RegisterStartupScript(this, typeof(string), "userDetIncmDefContact", "window.open('" + forwardString + "',null,'resizeable=yes,scrollbars=yes,addressbar=no,toolbar=yes,width=400,height=400,left=500,right=500');", true); }
protected void LinkButton_All_Comm_Command(object sender, CommandEventArgs e) { LinkButton linkb = (LinkButton)sender; GridViewRow row = (GridViewRow)linkb.NamingContainer; if (row != null && row.RowIndex != -1 && row.RowIndex != GridView_Incoming_Defects.SelectedIndex) { GridView_Incoming_Defects.SelectRow(row.RowIndex); } ((RadioButton)GridView_Incoming_Defects.SelectedRow.Cells[0].FindControl("incm_radio")).Checked = true; String sourceEnt = Session[SessionFactory.MAIN_BUSINESS_ENTITY_ID_STRING].ToString(); String forwardString = "/Pages/DispComm.aspx"; forwardString += "?contextId=" + ((Label)GridView_Incoming_Defects.SelectedRow.Cells[0].FindControl("Label_Defect_Id")).Text + "&source=" + sourceEnt; ScriptManager.RegisterStartupScript(this, typeof(string), "CommIncmDef", "window.open('" + forwardString + "',null,'resizeable=yes,scrollbars=yes,addressbar=no,toolbar=yes,width=800,height=800,left=500,right=500');", true); }
protected void fillIncomingDefectGrid(Dictionary <String, DefectDetails> defectDictPassed) { String[] contactEntId = Request.QueryString.GetValues("contactId"); DataTable dt = new DataTable(); dt.Columns.Add("DefectId"); dt.Columns.Add("RFQId"); dt.Columns.Add("InvNo"); dt.Columns.Add("descr"); dt.Columns.Add("Submit Date"); dt.Columns.Add("Amount"); dt.Columns.Add("Defect_Stat"); dt.Columns.Add("Defect_Stat_Reason"); dt.Columns.Add("Assigned_To"); dt.Columns.Add("Severity"); dt.Columns.Add("Defect_Resol_Stat"); Dictionary <String, DefectDetails> defectDict = new Dictionary <string, DefectDetails>(); if (defectDictPassed == null) { defectDict = BackEndObjects.DefectDetails.getAllDefectDetailsforSupplierIdDB(Session[SessionFactory.MAIN_BUSINESS_ENTITY_ID_STRING].ToString()); } else { defectDict = defectDictPassed; } int counter = 0; DateUtility dU = new DateUtility(); foreach (KeyValuePair <String, DefectDetails> kvp in defectDict) { BackEndObjects.DefectDetails defObj = kvp.Value; String custId = defObj.getCustomerId(); if (custId != null && custId.Equals(contactEntId[0])) { dt.Rows.Add(); dt.Rows[counter]["DefectId"] = defObj.getDefectId(); dt.Rows[counter]["RFQId"] = defObj.getRFQId(); dt.Rows[counter]["InvNo"] = defObj.getInvoiceId(); dt.Rows[counter]["descr"] = defObj.getDescription(); dt.Rows[counter]["Submit Date"] = dU.getConvertedDate(defObj.getDateCreated()); dt.Rows[counter]["Amount"] = defObj.getTotalAmount(); dt.Rows[counter]["Defect_Stat"] = defObj.getDefectStat(); dt.Rows[counter]["Defect_Stat_Reason"] = defObj.getStatReason(); dt.Rows[counter]["Assigned_To"] = defObj.getAssignedToUser(); dt.Rows[counter]["Severity"] = defObj.getSeverity(); dt.Rows[counter]["Defect_Resol_Stat"] = defObj.getResolStat(); counter++; } } GridView_Incoming_Defects.Visible = true; GridView_Incoming_Defects.DataSource = dt; GridView_Incoming_Defects.DataBind(); Session[SessionFactory.ALL_CONTACT_ALL_DEFECT_INCOMING_DEF_GRID] = dt; Session[SessionFactory.ALL_CONTACT_ALL_DEFECT_INCOMING_DEF_DICTIONARY] = defectDict; }
protected void GridView_Incoming_Defects_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView_Incoming_Defects.PageIndex = e.NewPageIndex; GridView_Incoming_Defects.DataSource = (DataTable)Session[SessionFactory.ALL_CONTACT_ALL_DEFECT_INCOMING_DEF_GRID]; GridView_Incoming_Defects.DataBind(); }