Exemplo n.º 1
0
        protected void GridView_Out_Defect_RadioSelect(object sender, EventArgs e)
        {
            RadioButton linkb = (RadioButton)sender;
            GridViewRow row   = (GridViewRow)linkb.NamingContainer;

            if (row != null && row.RowIndex != -1)
            {
                GridView_Outgoing_Defects.SelectRow(row.RowIndex);
            }
        }
Exemplo n.º 2
0
        protected void LinkButton_All_Comm_Outg_Command(object sender, CommandEventArgs e)
        {
            LinkButton  linkb = (LinkButton)sender;
            GridViewRow row   = (GridViewRow)linkb.NamingContainer;

            if (row != null && row.RowIndex != -1 && row.RowIndex != GridView_Outgoing_Defects.SelectedIndex)
            {
                GridView_Outgoing_Defects.SelectRow(row.RowIndex);
            }

            ((RadioButton)GridView_Outgoing_Defects.SelectedRow.Cells[0].FindControl("outg_radio")).Checked = true;

            String sourceEnt = Session[SessionFactory.MAIN_BUSINESS_ENTITY_ID_STRING].ToString();

            String forwardString = "/Pages/DispComm.aspx";

            forwardString += "?contextId=" + ((Label)GridView_Outgoing_Defects.SelectedRow.Cells[0].FindControl("Label_Defect_Id")).Text +
                             "&source=" + sourceEnt;

            ScriptManager.RegisterStartupScript(this, typeof(string), "CommOutgDef",
                                                "window.open('" + forwardString + "',null,'resizeable=yes,scrollbars=yes,addressbar=no,toolbar=yes,width=800,height=800,left=500,right=500');", true);
        }
Exemplo n.º 3
0
        protected void fillOutgoingDefectGrid(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.getAllDefectDetailsforCustomerIdDB(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 suplId = defObj.getSupplierId();

                if (suplId != null && suplId.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_Outgoing_Defects.Visible    = true;
            GridView_Outgoing_Defects.DataSource = dt;
            GridView_Outgoing_Defects.DataBind();

            Session[SessionFactory.ALL_CONTACT_ALL_DEFECT_OUTGOING_DEF_GRID]       = dt;
            Session[SessionFactory.ALL_CONTACT_ALL_DEFECT_OUTGOING_DEF_DICTIONARY] = defectDictPassed;
        }
Exemplo n.º 4
0
 protected void GridView_Outgoing_Defects_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GridView_Outgoing_Defects.PageIndex  = e.NewPageIndex;
     GridView_Outgoing_Defects.DataSource = (DataTable)Session[SessionFactory.ALL_CONTACT_ALL_DEFECT_OUTGOING_DEF_GRID];
     GridView_Outgoing_Defects.DataBind();
 }