Exemple #1
0
    protected void AdminView_Command(object sender, CommandEventArgs e)
    {
        CloseAll();
        Admns.Attributes.Remove("style");
        Admns.Style.Add("display", "block");

        DropEmployeesU.DataSource     = Obj.GetDataSetByID("GetEmpNamesByAdm", Convert.ToInt32(e.CommandArgument));
        DropEmployeesU.DataTextField  = "EmpName";
        DropEmployeesU.DataValueField = "EmpID";
        DropEmployeesU.DataBind();
        DropEmployeesU.Items.Insert(0, "");
        LblAdmID.Text = e.CommandArgument.ToString();
        FillManagers();
    }
Exemple #2
0
    protected void SaveManger_Click1(object sender, EventArgs e)
    {
        SucE.Visible = false;
        SucD.Visible = false;
        RettE.Text   = "";
        var Res = Obj.ExecuteProcedure2ID("AssignAdminManager", Convert.ToInt32(DropEmployeesU.SelectedValue), Convert.ToInt32(LblAdmID.Text));

        if (Res != 0)
        {
            DropEmployeesU.DataSource     = Obj.GetDataSetByID("GetEmpNamesByAdm", Convert.ToInt32(LblAdmID.Text));
            DropEmployeesU.DataTextField  = "EmpName";
            DropEmployeesU.DataValueField = "EmpID";
            DropEmployeesU.DataBind();
            DropEmployeesU.Items.Insert(0, "");
            FillManagers();
            SucE.Visible = true;
        }
        else
        {
            RettE.Text = " خطأ فى التنفيذ";
        }
    }
Exemple #3
0
    protected void DelManager_Click(object sender, ImageClickEventArgs e)
    {
        SucE.Visible = false;
        SucD.Visible = false;
        RettE.Text   = "";

        var Res = Obj.ExecuteProcedureID("DelManger", Convert.ToInt32(DMang.Value));

        if (Res == 1)
        {
            FillManagers();
            SucD.Visible = true;
            DropEmployeesU.DataSource     = Obj.GetDataSetByID("GetEmpNamesByAdm", Convert.ToInt32(LblAdmID.Text));
            DropEmployeesU.DataTextField  = "EmpName";
            DropEmployeesU.DataValueField = "EmpID";
            DropEmployeesU.DataBind();
            DropEmployeesU.Items.Insert(0, "");
        }
        else
        {
            RettE.Text = " خطأ فى التنفيذ";
        }
    }