Beispiel #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        List<Maticsoft.Model.messages.messages_rate> list = new List<Maticsoft.Model.messages.messages_rate>();
        list=bll.GetModelList("");

        Maticsoft.Model.messages.messages_rate model=new Maticsoft.Model.messages.messages_rate ();


        if (list == null || list.Count == 0)
        {
            model.rate = Convert.ToInt16(drpMonth.SelectedValue);

            model.upd_time = DateTime.Now;
            bll.Add(model);
        }
        else
        {
            model = list[0];
            model.rate = Convert.ToInt16(drpMonth.SelectedValue);

            model.upd_time = DateTime.Now;
            bll.Update(model);
        }

        ShowMessage("设置成功!");

    }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.messages.messages_rate model)
 {
     return(dal.Update(model));
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Maticsoft.Model.messages.messages_rate model)
 {
     return(dal.Add(model));
 }