Esempio n. 1
0
    protected void Edit_Command(object sender, CommandEventArgs e)
    {
        Suc.Visible = false;

        LblEdit.Text = "A";
        DataSet Ds = new DataSet();

        Ds = Obj.GetDataSetByID("GetPlanByID", Convert.ToInt32(e.CommandArgument));
        if (Ds.Tables.Count > 0 && Ds.Tables[0].Rows.Count > 0)
        {
            foreach (DataRow Row in Ds.Tables[0].Rows)
            {
                SaveAllU.CommandArgument = Convert.ToString(Row["ID"]);

                YearNameU.Value = Convert.ToString(Row["YearName"]);

                SectionList2U.DataSource = Obj.GetDataSetByID("GetPlansSection", Convert.ToInt32(Row["ID"]));
                SectionList2U.DataBind();
            }
        }

        CloseOthers();
        UPDAT.Attributes.Remove("Style");
        UPDAT.Style.Add("display", "block");
    }
Esempio n. 2
0
 protected void DelAdmsU_Command(object sender, CommandEventArgs e)
 {
     SucUpdate.Visible = false;
     Obj.ExecuteProcedureID("DelPlansByAdmin", Convert.ToInt32(e.CommandArgument));
     SucUpdate.Visible        = true;
     SectionList2U.DataSource = Obj.GetDataSetByID("GetPlansSection", Convert.ToInt32(SaveAllU.CommandArgument));
     SectionList2U.DataBind();
     BindEmployeesData();
     LblEdit.Text = "A";
 }
Esempio n. 3
0
    protected void DelSectionU_Command(object sender, CommandEventArgs e)
    {
        string[] Vall = e.CommandArgument.ToString().Split(',');

        SucUpdate.Visible = false;
        Obj.DelPlansSections(Convert.ToInt32(Vall[0]), Convert.ToInt32(Vall[1]));
        SucUpdate.Visible        = true;
        SectionList2U.DataSource = Obj.GetDataSetByID("GetPlansSection", Convert.ToInt32(SaveAllU.CommandArgument));
        SectionList2U.DataBind();
        BindEmployeesData();

        LblEdit.Text = "A";
    }
Esempio n. 4
0
    protected void SaveAllU_Click1(object sender, EventArgs e)
    {
        try
        {
            SucUpdate.Visible = false;

            if (SaveAllU.CommandArgument != "" && SaveAllU.CommandArgument != null && SaveAllU.CommandArgument != "0")
            {
                if (SectorU.SelectedValue != "")
                {
                    var Ret = 0;
                    if (AddAllAdms.Checked == true)
                    {
                        Ret = Obj.ExecuteProcedure2ID("NewPlansSectionsNoAdmins", Convert.ToInt32(SaveAllU.CommandArgument), Convert.ToInt32(SectorU.SelectedValue));
                    }
                    else
                    {
                        foreach (ListItem item in PermChecksU.Items)
                        {
                            if (item.Selected)
                            {
                                Ret = Obj.NewPlansSections(Convert.ToInt32(SaveAllU.CommandArgument), Convert.ToInt32(item.Value), Convert.ToInt32(SectorU.SelectedValue));
                            }
                        }
                    }

                    if (Ret != 0)
                    {
                        SectionList2U.DataSource = Obj.GetDataSetByID("GetPlansSection", Convert.ToInt32(SaveAllU.CommandArgument));
                        SectionList2U.DataBind();
                        RettU.Text     = "";
                        SucNew.Visible = true;
                        BindEmployeesData();
                    }
                }
            }
        }
        catch { }
    }