Esempio n. 1
0
    private void InitAction()
    {
        if (Request.QueryString["type"] != null)
        {
            string type = Request.QueryString["type"].ToString();
            // 判断动作
            switch (type)
            {
            case "add":
                break;

            case "modify":
                if (Request.QueryString["id"] != null)
                {
                    int id = int.Parse(Request.QueryString["id"].ToString());
                    InitData(id);
                }
                else
                {
                    ArtDilog.AlertAndRefresh("参数错误!", 1, "addArt", "error");
                }
                break;
            }
            this.hdfAction.Value = type;
        }
        else
        {
            ArtDilog.AlertAndRefresh("参数错误!", 1, "addArt", "error");
        }
    }
Esempio n. 2
0
    private void Add(Ads model)
    {
        int rows = bll.Add(model);

        if (rows > 0)
        {
            ArtDilog.AlertAndRefresh("添加信息成功!", 1);
        }
        else
        {
            ArtDilog.Alert("添加信息失败!", "error", 2);
        }
    }
Esempio n. 3
0
 private void Modify(Ads model)
 {
     bll.Update(model);
     ArtDilog.AlertAndRefresh("修改信息成功!", 1);
 }