Exemple #1
0
        private void CargarCentros()
        {
            try
            {
                Sesion Sesion = new Sesion();
                Sesion = (Sesion)Session["Sesion" + Session.SessionID];
                CapaNegocios.CN__Comun CN_Comun = new CapaNegocios.CN__Comun();

                if (Sesion.U_MultiOfi == false)
                {
                    CN_Comun.LlenaCombo(2, Sesion.Id_Emp, Sesion.Id_U, Sesion.Emp_Cnx, "spCatCentroDistribucion_Combo", ref CmbCentro);
                    this.CmbCentro.Visible = false;
                    this.TblEncabezado.Rows[0].Cells[2].InnerText = " " + CmbCentro.FindItemByValue(Sesion.Id_Cd_Ver.ToString()).Text;
                }
                else
                {
                    CN_Comun.LlenaCombo(1, Sesion.Id_Emp, Sesion.Id_U, sesion.Id_Cd_Ver, sesion.Id_Cd, Sesion.Emp_Cnx, "spCatCentroDistribucion_Combo", ref CmbCentro);
                    this.CmbCentro.SelectedValue = Sesion.Id_Cd_Ver.ToString();
                }
                CN_Comun.LlenaListBox(2, Sesion.Id_Emp, Sesion.Id_U, Sesion.Emp_Cnx, "spCatCentroDistribucion_Combo", ref RadListBox1);
                RadListBox1.Items.Remove(RadListBox1.FindItemByValue("-1"));
                RadListBox1.Items.Remove(RadListBox1.FindItemByValue("0"));
                RadListBox1.FindItemByValue(Sesion.Id_Cd_Ver.ToString()).Enabled = false;
                RadListBox1.FindItemByValue(Sesion.Id_Cd_Ver.ToString()).Checked = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
 public void populateusers()
 {
     qry  = "Execute [proc_getusers]";
     Cn   = new SqlConnection(sConnectionString);
     myda = new SqlDataAdapter(qry, Cn);
     ds   = new DataSet();
     myda.Fill(ds);
     RadListBox1.DataSource     = ds.Tables[0];
     RadListBox1.DataTextField  = ds.Tables[0].Columns["FULL_NAME"].ToString();
     RadListBox1.DataValueField = ds.Tables[0].Columns["USERID"].ToString();
     RadListBox1.DataBind();
 }
Exemple #3
0
    protected void btnSort_Click(object sender, EventArgs e)
    {
        string PickType      = "GROUPTYPE";
        string StatusVisible = "YES";

        RadListBox1.DataSource     = GroupMaster.GetGroupTypeSort(PickType, StatusVisible);
        RadListBox1.DataTextField  = "PickDesc";
        RadListBox1.DataValueField = "PickCode";
        RadListBox1.DataSortField  = "Sort";
        RadListBox1.DataBind();
        pnlSort.Visible = true;
        Grid.Enabled    = false;
    }
Exemple #4
0
    protected void btnSort_Click(object sender, EventArgs e)
    {
        string InstructionType = ddlInstructionType.SelectedValue;

        RadListBox1.DataSource     = GroupMaster.GetInstructionSort(InstructionType);
        RadListBox1.DataTextField  = "InstructionCode";
        RadListBox1.DataValueField = "RID";
        RadListBox1.DataSortField  = "InstructionSort";
        RadListBox1.DataBind();
        pnlSort.Visible            = true;
        Grid.Enabled               = false;
        ddlInstructionType.Enabled = false;
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack && !Page.IsCallback)
     {
         if (this.DataSource != null)
         {
             RadListBox1.DataSource     = this.DataSource;
             RadListBox1.DataValueField = "Id";
             RadListBox1.DataTextField  = "UserName";
             RadListBox1.DataBind();
         }
     }
 }
Exemple #6
0
    protected void btnSort_Click(object sender, EventArgs e)
    {
        int R, T;

        R = Convert.ToInt32(ddlReports.SelectedValue);
        T = Convert.ToInt32(ddlTypes.SelectedValue);
        //Response.Redirect("TypesReportsTaskSort.aspx?Report="+R.ToString() + "&Type="+T.ToString());

        RadListBox1.DataSource     = GroupMaster.GetTaskTypeReportSort(R, T);
        RadListBox1.DataTextField  = "Task";
        RadListBox1.DataValueField = "ReportID";
        RadListBox1.DataSortField  = "RptOrder";
        RadListBox1.DataBind();
        pnlSort.Visible = true;
    }
 protected void BtnSearchContact_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable dtcon = CM_Main.SelectJob("CASE1", txtUserName.Text, txtEPF.Text, "", "", "", System.DateTime.Now);
         RadListBox1.DataSource     = dtcon;
         RadListBox1.DataTextField  = "FULL_NAME";
         RadListBox1.DataValueField = "USER_NAME";
         RadListBox1.DataBind();
     }
     catch (Exception ex)
     {
         lblError.Text    = ex.Message;
         lblError.Visible = true;
         return;
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (Request.QueryString["MasterCopySeparationSetList"] != null)
                {
                    try
                    {
                        txtMasterCopySeparationSetList.Text = (string)Request.QueryString["MasterCopySeparationSetList"];
                    }
                    catch //(Exception e1)
                    {
                        ;
                    }
                }
                else
                {
                    InjectScript.Text = "<script>CloseOnReload()</" + "script>";
                    return;
                }

                DataTable dtExternalStatus = (DataTable)HttpContext.Current.Cache["ExtStatusNameCache"];

                var arr = new string[dtExternalStatus.Rows.Count];
                int i   = 0;
                foreach (DataRow row in dtExternalStatus.Rows)
                {
                    arr[i++] = (string)row["StatusName"];
                }

                RadListBox1.DataSource = arr;
                RadListBox1.DataBind();
            }

            Response.ContentEncoding              = Encoding.GetEncoding((string)Session["encoding"]);
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture((string)Session["language"]);
            Thread.CurrentThread.CurrentUICulture = new CultureInfo((string)Session["language"]);

            btnCancel.Text = Global.rm.GetString("txtCancel");
            btnApply.Text  = Global.rm.GetString("txtApply");
        }
Exemple #9
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;
            }
        }
Exemple #10
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;
            }
        }