示例#1
0
        /// <summary>
        /// 判断登陆
        /// </summary>
        private void login(HttpContext context)
        {
            if (bll.Exists(context.Request["LoginName"].ToString(), context.Request["LoginPwd"].ToString()))

            {
                model = bll.GetModel(context.Request["LoginName"].ToString());//根据用户名(唯一)得到所有信息

                context.Response.Write("{\"Result\":\"1\",\"CustomerID\":\"" + model.CustomerID + "\",\"CustomerName\":\"" + model.CustomerName + "\",\"LoginName\":\"" + model.LoginName + "\",\"Sex\":\"" + model.Sex + "\",\"PhoneNum\":\"" + model.PhoneNum + "\",\"Email\":\"" + model.Email + "\"}");
            }
            else
            {
                context.Response.Write("{\"Result\":\"0\"}");
            }
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(CarSpirits.Model.Customer model)
 {
     return(dal.Update(model));
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(CarSpirits.Model.Customer model)
 {
     return(dal.Add(model));
 }