Пример #1
0
        private void Employee_Error_Entry_Load(object sender, EventArgs e)
        {
            Hashtable htuserid = new Hashtable();
            DataTable dtuserid = new DataTable();

            htuserid.Add("@Trans", "USERNAME");
            htuserid.Add("@User_id", userid);
            dtuserid = dataaccess.ExecuteSP("Sp_Error_Info", htuserid);
            if (dtuserid.Rows.Count > 0)
            {
                Username = dtuserid.Rows[0]["User_Name"].ToString();
            }
            BindErrorType();
            BindgrdError();
            if (Work_Type_Id == 3)
            {
                if (AdminStatus == 2)
                {
                    dbc.BindError_Task_Super_Qc(Cbo_Task, int.Parse(ORDERTASK));
                }
                else
                {
                    dbc.BindOrderStatus(Cbo_Task);
                }
            }
            else
            {
                if (AdminStatus == 2)
                {
                    dbc.BindError_Task(Cbo_Task, int.Parse(ORDERTASK));
                }
                else
                {
                    dbc.BindOrderStatus(Cbo_Task);
                }
            }
            grd_Error.ColumnHeadersDefaultCellStyle.BackColor = Color.SteelBlue;
            grd_Error.EnableHeadersVisualStyles = false;
            grd_Error.ColumnHeadersDefaultCellStyle.ForeColor = Color.WhiteSmoke;
            ddl_User.Visible = false;
            BindgrdError();
        }
Пример #2
0
        private void Employee_Error_Entry_Load(object sender, EventArgs e)
        {
            tabPageExternalErrorEntry.PageVisible = false;
            if (User_Role == "1" || User_Role == "4" || User_Role == "6")
            {
                tabPageExternalErrorEntry.PageVisible = true;
                // BindExternalErrorEntry();
            }
            tabPaneErrorEntry.SelectedPage = tabPageInternalErrorEntry;

            Hashtable htuserid = new Hashtable();
            DataTable dtuserid = new DataTable();

            htuserid.Add("@Trans", "USERNAME");
            htuserid.Add("@User_id", userid);
            dtuserid = dataaccess.ExecuteSP("Sp_Error_Info", htuserid);
            if (dtuserid.Rows.Count > 0)
            {
                Username = dtuserid.Rows[0]["User_Name"].ToString();
            }

            Bind_New_ErrorType();
            BindErrorType();
            BindgrdError();

            BindExternalNewErrorType();
            BindExternalErrorType();
            BindGridExternalErrors();

            if (Work_Type_Id == 3)
            {
                if (AdminStatus == 2)// This is For Super Qc
                {
                    dbc.BindError_Task_Super_Qc(Cbo_Task, int.Parse(ORDERTASK));
                    dbc.BindError_Task_Super_Qc(ddlExternalTask, Convert.ToInt32(ORDERTASK));
                }
                else
                {
                    dbc.BindOrderStatus(Cbo_Task);
                    dbc.BindOrderStatus(ddlExternalTask);
                }
            }
            else
            {
                if (AdminStatus == 2)
                {
                    if (Client_Id == 40)// this is for Title Exam order 40 Client Id
                    {
                        dbc.BindError_Task_For_Title_Exam(Cbo_Task);
                        dbc.BindError_Task_For_Title_Exam(ddlExternalTask);
                    }
                    else
                    {
                        dbc.BindError_Task(Cbo_Task, int.Parse(ORDERTASK));
                        dbc.BindError_Task(ddlExternalTask, Convert.ToInt32(ORDERTASK));
                    }
                }
                else
                {
                    dbc.BindOrderStatus(Cbo_Task);
                    dbc.BindOrderStatus(ddlExternalTask);
                }
            }
            grd_Error.ColumnHeadersDefaultCellStyle.BackColor = Color.SteelBlue;
            grd_Error.EnableHeadersVisualStyles = false;
            grd_Error.ColumnHeadersDefaultCellStyle.ForeColor = Color.WhiteSmoke;

            gridExternalError.ColumnHeadersDefaultCellStyle.BackColor = Color.SteelBlue;
            gridExternalError.EnableHeadersVisualStyles = false;
            gridExternalError.ColumnHeadersDefaultCellStyle.ForeColor = Color.WhiteSmoke;

            ddl_User.Visible        = false;
            ddlExternalUser.Visible = false;

            BindgrdError();
            cbo_ErrorCatogery.Focus();
            //Error info details
            if (ErrorInfo_ID != 0)
            {
                Error_Info_Details();
                grd_Error.Visible = false;
            }
        }