Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    DataTable dtconall = CM_Main.SelectJob("CASE2", "", "INTIMATE", "", "", "", System.DateTime.Now);
                    grdRequest.DataSource = dtconall;
                    grdRequest.DataBind();

                    UserName = User.Identity.Name;
                    if (Left(UserName, 4) == "HNBA")
                    {
                        UserName        = Right(UserName, (UserName.Length) - 5);
                        Session["USER"] = UserName;
                        GetUser(UserName.ToString());
                    }
                    else if (Left(UserName, 5) == "HNBGI")
                    {
                        UserName        = Right(UserName, (UserName.Length) - 6);
                        Session["USER"] = UserName;
                        GetUser(UserName.ToString());
                    }
                    //DataTable dtconall = CM_Main.SelectJob("CASE2", "", "INTIMATE", "", "", "", System.DateTime.Now);
                    //grdRequest.DataSource = dtconall;
                    //grdRequest.DataBind();

                    if (Request.QueryString["ReqID"] != null)
                    {
                        ReqID = Request.QueryString["ReqID"];

                        DataTable dtcon = CM_Main.SelectJob("CASE3", ReqID, "", "", "", "", System.DateTime.Now);
                        grdRequest.DataSource = dtcon;
                        grdRequest.DataBind();

                        BtnUpdate.Enabled = true;
                        BtnReject.Enabled = true;

                        lblID.Text    = dtcon.Rows[0]["REQUEST_ID"].ToString();
                        txtReqID.Text = dtcon.Rows[0]["REQUEST_ID"].ToString();

                        if (dtcon.Rows[0]["START_DATE"].ToString() != "")
                        {
                            Start.SelectedDate = Convert.ToDateTime(dtcon.Rows[0]["START_DATE"]);
                        }
                        if (dtcon.Rows[0]["END_DATE"].ToString() != "")
                        {
                            End.SelectedDate = Convert.ToDateTime(dtcon.Rows[0]["END_DATE"]);
                        }

                        if (dtcon.Rows[0]["IMPACT"].ToString() != "")
                        {
                            txtImpact.Text = dtcon.Rows[0]["IMPACT"].ToString();
                        }

                        if (dtcon.Rows[0]["FEEDBACK_PLAN"].ToString() != "")
                        {
                            txtFallback.Text = dtcon.Rows[0]["FEEDBACK_PLAN"].ToString();
                        }

                        if (dtcon.Rows[0]["REJECT_COMMENT"].ToString() != "")
                        {
                            txtReject.Text = dtcon.Rows[0]["REJECT_COMMENT"].ToString();
                        }

                        DataTable Users = CM_Main.SelectJob("CASE1", "", "", "", "", "", System.DateTime.Now);

                        CmbUsers1.DataSource     = Users;
                        CmbUsers1.DataValueField = "USER_NAME";
                        CmbUsers1.DataTextField  = "FULL_NAME";
                        CmbUsers1.DataBind();

                        if (dtcon.Rows[0]["MANAGER"].ToString() != "")
                        {
                            CmbUsers1.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["MANAGER"].ToString(), dtcon.Rows[0]["MANAGER"].ToString()));
                        }
                        else
                        {
                            CmbUsers1.Items.Insert(0, new RadComboBoxItem("--Select User--", ""));
                        }

                        CmbUsers2.DataSource     = Users;
                        CmbUsers2.DataValueField = "USER_NAME";
                        CmbUsers2.DataTextField  = "FULL_NAME";
                        CmbUsers2.DataBind();

                        if (dtcon.Rows[0]["IMPLEMENTOR"].ToString() != "")
                        {
                            CmbUsers2.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["IMPLEMENTOR"].ToString(), dtcon.Rows[0]["IMPLEMENTOR"].ToString()));
                        }
                        else
                        {
                            CmbUsers2.Items.Insert(0, new RadComboBoxItem("--Select User--", ""));
                        }

                        CmbUsers3.DataSource     = Users;
                        CmbUsers3.DataValueField = "USER_NAME";
                        CmbUsers3.DataTextField  = "FULL_NAME";
                        CmbUsers3.DataBind();

                        if (dtcon.Rows[0]["QA_AGENT"].ToString() != "")
                        {
                            CmbUsers3.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["QA_AGENT"].ToString(), dtcon.Rows[0]["QA_AGENT"].ToString()));
                        }
                        else
                        {
                            CmbUsers3.Items.Insert(0, new RadComboBoxItem("--Select User--", ""));
                        }

                        CmbUsers4.DataSource     = Users;
                        CmbUsers4.DataValueField = "USER_NAME";
                        CmbUsers4.DataTextField  = "FULL_NAME";
                        CmbUsers4.DataBind();

                        if (dtcon.Rows[0]["RELEASE_TEAM"].ToString() != "")
                        {
                            CmbUsers4.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["RELEASE_TEAM"].ToString(), dtcon.Rows[0]["RELEASE_TEAM"].ToString()));
                        }
                        else
                        {
                            CmbUsers4.Items.Insert(0, new RadComboBoxItem("--Select User--", ""));
                        }


                        if (dtcon.Rows[0]["OUTAGE"].ToString() != "")
                        {
                            CmbOutage.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["OUTAGE"].ToString(), dtcon.Rows[0]["OUTAGE"].ToString()));
                            CmbOutage.Items.Insert(1, new RadComboBoxItem("YES", "YES"));
                            CmbOutage.Items.Insert(2, new RadComboBoxItem("NO", "NO"));
                        }
                        else
                        {
                            CmbOutage.Items.Insert(0, new RadComboBoxItem("YES", "YES"));
                            CmbOutage.Items.Insert(1, new RadComboBoxItem("NO", "NO"));
                        }

                        //-------IT Work Flow Details

                        DataTable dtconIT = CM_Main.SelectJob("CASE11", ReqID, "", "", "", "", System.DateTime.Now);

                        txtReqID.Text        = dtconIT.Rows[0]["REQUEST_ID"].ToString();
                        lblCompany.Text      = dtconIT.Rows[0]["COMPANY"].ToString();
                        lblStatus.Text       = dtconIT.Rows[0]["STATUS"].ToString();
                        lblTitle.Text        = dtconIT.Rows[0]["TITLE"].ToString();
                        lblSystem.Text       = dtconIT.Rows[0]["SYSTEM"].ToString();
                        lblDescription.Text  = dtconIT.Rows[0]["IT_DES"].ToString();
                        lblITWorkFlowID.Text = dtconIT.Rows[0]["IT_REQUEST_ID"].ToString();


                        lblParent.Text = dtconIT.Rows[0]["PARENT_ID"].ToString();

                        DataTable dt = Main.SelectImages(lblITWorkFlowID.Text, "BRANCH_IMAGE");
                        galleryDataList.DataSource = dt;
                        galleryDataList.DataBind();

                        DataTable dt33 = Main.SelectImages(lblITWorkFlowID.Text, "BRANCH_DOCS");
                        DataList2.DataSource = dt33;
                        DataList2.DataBind();

                        RdGrdEvents.DataSource = CM_Main.SelectJob("CASE10", ReqID, "", "", "", "", System.DateTime.Now);
                        RdGrdEvents.DataBind();

                        DataTable dtEvents = Main.SelectJobFromRegister("CASE16", lblITWorkFlowID.Text, "", "", System.DateTime.Now);
                        RadGrdEventsITWF.DataSource = dtEvents;
                        RadGrdEventsITWF.DataBind();

                        DataTable dtDocsSysWise = CM_Main.SelectJob("CASE12", txtReqID.Text, "", "", "", "", System.DateTime.Now);
                        RadListBox1.DataSource     = dtDocsSysWise;
                        RadListBox1.DataTextField  = "DOCUMENT";
                        RadListBox1.DataValueField = "DOCUMENT";
                        RadListBox1.DataBind();

                        DataTable dtDocsJobWise = CM_Main.SelectJob("CASE13", txtReqID.Text, "", "", "", "", System.DateTime.Now);
                        if (dtDocsJobWise.Rows.Count >= 1)
                        {
                            RadListBox2.DataSource     = dtDocsJobWise;
                            RadListBox2.DataTextField  = "DOCUMENT";
                            RadListBox2.DataValueField = "DOCUMENT";
                            RadListBox2.DataBind();
                        }
                    }

                    ddlStatusSch.Items.Clear();
                    ddlStatusSch.DataSource     = CM_Main.SelectReferanceData("STATUS", "", "");
                    ddlStatusSch.DataValueField = "DESCRIPTION";
                    ddlStatusSch.DataTextField  = "DESCRIPTION";
                    ddlStatusSch.DataBind();
                    ddlStatusSch.Items.Insert(0, new RadComboBoxItem("--Select Status--", ""));

                    ddlRequestUserSch.Items.Clear();
                    ddlRequestUserSch.DataSource     = Main.SelectReferanceData("HELPDESK_USERS", "", "");
                    ddlRequestUserSch.DataValueField = "USER_NAME";
                    ddlRequestUserSch.DataTextField  = "FULL_NAME";
                    ddlRequestUserSch.DataBind();
                    ddlRequestUserSch.Items.Insert(0, new RadComboBoxItem("--Select Request User--", ""));
                }
            }
            catch (Exception ex)
            {
                lblError.Text    = ex.Message;
                lblError.Visible = true;
                return;
            }
        }
Пример #2
0
        protected void grdRequest_ItemCommand(object sender, GridCommandEventArgs e)
        {
            try
            {
                if (e.CommandName == "Select")
                {
                    GridDataItem dataitem = e.Item as GridDataItem;

                    DataTable dtcon = CM_Main.SelectJob("CASE3", dataitem["REQUEST_ID"].Text, "", "", "", "", System.DateTime.Now);
                    grdRequest.DataSource = dtcon;
                    grdRequest.DataBind();

                    BtnUpdate.Enabled = true;
                    BtnReject.Enabled = true;

                    lblID.Text    = dtcon.Rows[0]["REQUEST_ID"].ToString();
                    txtReqID.Text = dtcon.Rows[0]["REQUEST_ID"].ToString();

                    if (dtcon.Rows[0]["START_DATE"].ToString() != "")
                    {
                        Start.SelectedDate = Convert.ToDateTime(dtcon.Rows[0]["START_DATE"]);
                    }
                    if (dtcon.Rows[0]["END_DATE"].ToString() != "")
                    {
                        End.SelectedDate = Convert.ToDateTime(dtcon.Rows[0]["END_DATE"]);
                    }

                    if (dtcon.Rows[0]["IMPACT"].ToString() != "")
                    {
                        txtImpact.Text = dtcon.Rows[0]["IMPACT"].ToString();
                    }

                    if (dtcon.Rows[0]["FEEDBACK_PLAN"].ToString() != "")
                    {
                        txtFallback.Text = dtcon.Rows[0]["FEEDBACK_PLAN"].ToString();
                    }

                    if (dtcon.Rows[0]["REJECT_COMMENT"].ToString() != "")
                    {
                        txtReject.Text = dtcon.Rows[0]["REJECT_COMMENT"].ToString();
                    }

                    DataTable Users = CM_Main.SelectJob("CASE1", "", "", "", "", "", System.DateTime.Now);

                    CmbUsers1.DataSource     = Users;
                    CmbUsers1.DataValueField = "USER_NAME";
                    CmbUsers1.DataTextField  = "FULL_NAME";
                    CmbUsers1.DataBind();

                    if (dtcon.Rows[0]["MANAGER"].ToString() != "")
                    {
                        CmbUsers1.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["MANAGER"].ToString(), dtcon.Rows[0]["MANAGER"].ToString()));
                    }
                    else
                    {
                        CmbUsers1.Items.Insert(0, new RadComboBoxItem("--Select User--", ""));
                    }

                    CmbUsers2.DataSource     = Users;
                    CmbUsers2.DataValueField = "USER_NAME";
                    CmbUsers2.DataTextField  = "FULL_NAME";
                    CmbUsers2.DataBind();

                    if (dtcon.Rows[0]["IMPLEMENTOR"].ToString() != "")
                    {
                        CmbUsers2.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["IMPLEMENTOR"].ToString(), dtcon.Rows[0]["IMPLEMENTOR"].ToString()));
                    }
                    else
                    {
                        CmbUsers2.Items.Insert(0, new RadComboBoxItem("--Select User--", ""));
                    }

                    CmbUsers3.DataSource     = Users;
                    CmbUsers3.DataValueField = "USER_NAME";
                    CmbUsers3.DataTextField  = "FULL_NAME";
                    CmbUsers3.DataBind();

                    if (dtcon.Rows[0]["QA_AGENT"].ToString() != "")
                    {
                        CmbUsers3.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["QA_AGENT"].ToString(), dtcon.Rows[0]["QA_AGENT"].ToString()));
                    }
                    else
                    {
                        CmbUsers3.Items.Insert(0, new RadComboBoxItem("--Select User--", ""));
                    }

                    CmbUsers4.DataSource     = Users;
                    CmbUsers4.DataValueField = "USER_NAME";
                    CmbUsers4.DataTextField  = "FULL_NAME";
                    CmbUsers4.DataBind();

                    if (dtcon.Rows[0]["RELEASE_TEAM"].ToString() != "")
                    {
                        CmbUsers4.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["RELEASE_TEAM"].ToString(), dtcon.Rows[0]["RELEASE_TEAM"].ToString()));
                    }
                    else
                    {
                        CmbUsers4.Items.Insert(0, new RadComboBoxItem("--Select User--", ""));
                    }


                    if (dtcon.Rows[0]["OUTAGE"].ToString() != "")
                    {
                        CmbOutage.Items.Insert(0, new RadComboBoxItem(dtcon.Rows[0]["OUTAGE"].ToString(), dtcon.Rows[0]["OUTAGE"].ToString()));
                        CmbOutage.Items.Insert(1, new RadComboBoxItem("YES", "YES"));
                        CmbOutage.Items.Insert(2, new RadComboBoxItem("NO", "NO"));
                    }
                    else
                    {
                        CmbOutage.Items.Insert(0, new RadComboBoxItem("YES", "YES"));
                        CmbOutage.Items.Insert(1, new RadComboBoxItem("NO", "NO"));
                    }


                    //-------IT Work Flow Details

                    DataTable dtconIT = CM_Main.SelectJob("CASE11", dataitem["REQUEST_ID"].Text, "", "", "", "", System.DateTime.Now);

                    txtReqID.Text        = dtconIT.Rows[0]["REQUEST_ID"].ToString();
                    lblCompany.Text      = dtconIT.Rows[0]["COMPANY"].ToString();
                    lblStatus.Text       = dtconIT.Rows[0]["STATUS"].ToString();
                    lblTitle.Text        = dtconIT.Rows[0]["TITLE"].ToString();
                    lblSystem.Text       = dtconIT.Rows[0]["SYSTEM"].ToString();
                    lblDescription.Text  = dtconIT.Rows[0]["IT_DES"].ToString();
                    lblITWorkFlowID.Text = dtconIT.Rows[0]["IT_REQUEST_ID"].ToString();


                    lblParent.Text = dtconIT.Rows[0]["PARENT_ID"].ToString();

                    DataTable dt = Main.SelectImages(lblITWorkFlowID.Text, "BRANCH_IMAGE");
                    galleryDataList.DataSource = dt;
                    galleryDataList.DataBind();

                    DataTable dt33 = Main.SelectImages(lblITWorkFlowID.Text, "BRANCH_DOCS");
                    DataList2.DataSource = dt33;
                    DataList2.DataBind();

                    RdGrdEvents.DataSource = CM_Main.SelectJob("CASE10", dataitem["REQUEST_ID"].Text, "", "", "", "", System.DateTime.Now);
                    RdGrdEvents.DataBind();

                    DataTable dtEvents = Main.SelectJobFromRegister("CASE16", lblITWorkFlowID.Text, "", "", System.DateTime.Now);
                    RadGrdEventsITWF.DataSource = dtEvents;
                    RadGrdEventsITWF.DataBind();


                    DataTable dtDocsSysWise = CM_Main.SelectJob("CASE12", txtReqID.Text, "", "", "", "", System.DateTime.Now);
                    RadListBox1.DataSource     = dtDocsSysWise;
                    RadListBox1.DataTextField  = "DOCUMENT";
                    RadListBox1.DataValueField = "DOCUMENT";
                    RadListBox1.DataBind();

                    DataTable dtDocsJobWise = CM_Main.SelectJob("CASE13", txtReqID.Text, "", "", "", "", System.DateTime.Now);
                    if (dtDocsJobWise.Rows.Count >= 1)
                    {
                        RadListBox2.DataSource     = dtDocsJobWise;
                        RadListBox2.DataTextField  = "DOCUMENT";
                        RadListBox2.DataValueField = "DOCUMENT";
                        RadListBox2.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
                lblError.Text    = ex.Message;
                lblError.Visible = true;
                return;
            }
        }