Пример #1
0
    protected void LinkButtonPx_Click(object sender, EventArgs e)
    {
        var lb = (LinkButton)sender;
        var bl = new DS_Area_Br();

        bl.Sort(int.Parse(lb.Attributes["pid"]), bool.Parse(lb.Attributes["cn"]));
        BindDate(ViewState["sql"].ToString(), (object[])ViewState["param"]);
    }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     var bl = new DS_Area_Br();
     string act=Request["action"];
     switch (act) { 
         case "add":
             var md = bl.CreateModel();
             md.ParentID = int.Parse(Request.Form["parentid"]);
             md.AreaName=Request.Form["an"];
             md.Px = 0;
             bl.Add(md);
             bl.Sort(md.ID,true);
             break;
         case "edit":
             md = bl.GetSingle(int.Parse(Request.Form["id"]));
             md.AreaName = Request.Form["an"];
             bl.Update(md);
             break;
     }
 }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var    bl  = new DS_Area_Br();
        string act = Request["action"];

        switch (act)
        {
        case "add":
            var md = bl.CreateModel();
            md.ParentID = int.Parse(Request.Form["parentid"]);
            md.AreaName = Request.Form["an"];
            md.Px       = 0;
            bl.Add(md);
            bl.Sort(md.ID, true);
            break;

        case "edit":
            md          = bl.GetSingle(int.Parse(Request.Form["id"]));
            md.AreaName = Request.Form["an"];
            bl.Update(md);
            break;
        }
    }
Пример #4
0
 protected void LinkButtonPx_Click(object sender, EventArgs e)
 {
     var lb = (LinkButton)sender;
     var bl = new DS_Area_Br();
     bl.Sort(int.Parse(lb.Attributes["pid"]), bool.Parse(lb.Attributes["cn"]));
     BindDate(ViewState["sql"].ToString(),(object[])ViewState["param"]);
 }