コード例 #1
0
        private void BindGridView()
        {
            System.DateTime sysdate    = DateTime.MinValue;
            System.DateTime sysdatemax = DateTime.MaxValue;
            DataTable       dt_SearchComplainCirciuits = objBSS.SearchComplainCircuits("", 0, "", "", "", "", 4, 0, 0, "", 0, 0, 0, 0, sysdate, sysdate, 0, Convert.ToInt32(Session["DepartmentID"]), 0, 0, "OM", 0, 0, 0, 0, 0);

            GVTeam.DataSource = dt_SearchComplainCirciuits;
            GVTeam.DataBind();
        }
コード例 #2
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            System.DateTime sysdate    = DateTime.MinValue;
            System.DateTime sysdatemax = DateTime.MaxValue;
            if (txtSignUpID.Text.Equals(""))
            {
                txtSignUpID.Text = "0";
            }
            //DataTable dt_SearchComplainCirciuits = objBSS.SearchComplainCircuits("", Convert.ToInt32(txtSignUpID.Text), "", "", "", "", 4, Convert.ToInt32(cmbCity.SelectedValue), 0, "", 0, 0, 0, 0, sysdate, sysdate, 0, Convert.ToInt32(Session["DepartmentID"]), Convert.ToInt32(cmbNode.SelectedValue) , 0, "OM", 0, 0, 0, 0, 0);
            DataTable dt_SearchComplainCirciuits = objBSS.SearchComplainCircuits("", Convert.ToInt32(txtSignUpID.Text), "", "", "", "", 4, Convert.ToInt32(cmbCity.SelectedValue), 0, "", 0, 0, 0, 0, sysdate, sysdate, 0, Convert.ToInt32(Session["DepartmentID"]), Convert.ToInt32(cmbNode.SelectedValue), 0, "OM", 0, 0, 0, 0, 0);

            GVTeam.DataSource = dt_SearchComplainCirciuits;
            GVTeam.DataBind();
        }
コード例 #3
0
        private void SetInitialRow()
        {
            System.DateTime sysdate = DateTime.MinValue;
            DataTable       dt_SearchComplainCirciuits = objBSS.SearchComplainCircuits("", 0, "", "", "", "", 4, 0, 0, "", 0, 0, 0, 0, sysdate, sysdate, 0, Convert.ToInt32(Session["DepartmentID"]), 0, 0, "OM", 0, 0, 0, 0, 0);

            GVTeam.DataSource = dt_SearchComplainCirciuits;
            GVTeam.DataBind();
            //Store the DataTable in ViewState for future reference
            ViewState["CurrentTable"] = dt_SearchComplainCirciuits;

            //Bind the Gridview
            GVTeam.DataSource = dt_SearchComplainCirciuits;
            GVTeam.DataBind();

            //After binding the gridview, we can then extract and fill the DropDownList with Data
            for (int i = 0; i < dt_SearchComplainCirciuits.Rows.Count; i++)
            {
                DropDownList ddl1 = (DropDownList)GVTeam.Rows[i].Cells[1].FindControl("DropDownList1");
                DropDownList ddl2 = (DropDownList)GVTeam.Rows[i].Cells[2].FindControl("DropDownList2");
                FillDropDownList(ddl2);
                FillDropDownList2(ddl1);
            }
        }
コード例 #4
0
        private void SetInitialRow()
        {
            int    SignupID = 0;
            int    City     = 0;
            int    node     = 0;
            string team     = "";

            if (txtSignUpID.Text != "")
            {
                SignupID = Convert.ToInt32(txtSignUpID.Text);
            }
            if (cmbCity.SelectedValue != "0")
            {
                City = Convert.ToInt32(cmbCity.SelectedValue);
            }
            if (cmbNode.SelectedValue != "0")
            {
                node = Convert.ToInt32(cmbNode.SelectedValue);
            }
            System.DateTime sysdate = DateTime.MinValue;
            DataTable       dt_SearchComplainCirciuits = objBSS.SearchComplainCircuits("", SignupID, "", "", "", "", 4, City, 0, "", 0, 0, 0, 0, sysdate, sysdate, 0, Convert.ToInt32(Session["DepartmentID"]), node, 0, "OM", 0, 0, 0, 0, 0);
            DataTable       DTTeam = objBSS.GetTeamList();

            GVTeam.DataSource = dt_SearchComplainCirciuits;
            GVTeam.DataBind();
            //Store the DataTable in ViewState for future reference
            ViewState["CurrentTable"] = dt_SearchComplainCirciuits;

            //Bind the Gridview
            GVTeam.DataSource = dt_SearchComplainCirciuits;
            GVTeam.DataBind();

            dtForExcel = new DataTable();
            dtForExcel = dt_SearchComplainCirciuits;


            //After binding the gridview, we can then extract and fill the DropDownList with Data
            for (int i = 0; i < dt_SearchComplainCirciuits.Rows.Count; i++)
            {
                DropDownList ddl1 = (DropDownList)GVTeam.Rows[i].Cells[1].FindControl("DropDownList1");
                DropDownList ddl2 = (DropDownList)GVTeam.Rows[i].Cells[2].FindControl("DropDownList2");


                FillDropDownList(ddl2);
                FillDropDownList2(ddl1);

                if (dt_SearchComplainCirciuits.Rows[i]["TeamName"].ToString() != "N/A")
                {
                    foreach (DataRow row in DTTeam.Rows)
                    {
                        if (row["TeamName"].ToString() == dt_SearchComplainCirciuits.Rows[i]["TeamName"].ToString())
                        {
                            team = row["TeamID"].ToString();
                        }
                    }

                    ddl1.SelectedValue = team;
                    ddl2.SelectedValue = dt_SearchComplainCirciuits.Rows[i]["Priority"].ToString();
                }
            }
        }