public int Insert(Model.User.UserLoginByPartner model) { try { return(dal.Insert(model)); } catch (Exception exception) { ExceptionHandler.HandleException(exception); return(0); } }
/// <summary> /// 增加一条数据 /// </summary> public int Insert(Model.User.UserLoginByPartner model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int, 4), new SqlParameter("@userid", SqlDbType.Int, 4), new SqlParameter("@plant", SqlDbType.TinyInt, 1), new SqlParameter("@plantname", SqlDbType.VarChar, 50), new SqlParameter("@openid", SqlDbType.VarChar, 100), new SqlParameter("@available", SqlDbType.TinyInt, 1) }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.userid; parameters[2].Value = model.plant; parameters[3].Value = model.plantname; parameters[4].Value = model.openid; parameters[5].Value = model.available; DbHelperSQL.RunProcedure("proc_userLoginByPartner_insert", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Model.User.UserLoginByPartner model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Model.User.UserLoginByPartner model) { return(dal.Add(model)); }