public string GetSaleListBySql(string aaa) { BaseOption <h_ch> bs = new BaseOption <h_ch>(); CommDAL dal = new CommDAL(); var sql = @"select c_chdh,c_name,c_num from h_ch where"; if (!string.IsNullOrEmpty(aaa)) { sql += " c_VIPID=" + aaa; } var list = dal.SqlQuery <h_ch>(sql); return(JsonConvert.SerializeObject(list)); }
protected void Page_Load(object sender, EventArgs e) { //Class1 dll = new Class1(); //var dyn = dll.Temp(); //Response.Write(dyn.ID); //Response.Write("<br />"); //Response.Write(dyn.Name); UserInfoDAL userInfoDal = new UserInfoDAL(); CommDAL dalComm = new CommDAL(); int id = 10000; UserInfo demo = userInfoDal.GetItem(id); Response.Write(demo.ID); Response.Write("<br />"); Response.Write(demo.UserName); }
public BaseBll() { if (dal == null) { dal = new CommDAL <TEntity>(); } if (personnelclient == null) { personnelclient = new PersonnelWS.PersonnelServiceClient(); } if (Orgclinet == null) { Orgclinet = new BLLCommonServices.OrganizationWS.OrganizationServiceClient(); } if (outInterfaceClient == null) { outInterfaceClient = new BLLCommonServices.WFPlatformWS.OutInterfaceClient(); } }
/* * public bool ChangePassword(int id, string newPassword, string oldPassword) { * SQLExecuteParam param = new SQLExecuteParam(); * * //检查老密码是否正确 * param.sql = @"SELECT * * FROM tbUser * WHERE id * = @id AND password = @password"; * * param.dict.Add("id", id); * param.dict.Add("password", MD5Helper.MD5Encrypt(oldPassword)); * * if (DBAgent.SQLExecuteReturnList<UserDto>(param).Count == 1) * { * //设置新密码 * param = new SQLExecuteParam(); * * param.sql = @"UPDATE tbUser * SET password = @password * WHERE id * = @id"; * * param.dict.Add("id", id); * param.dict.Add("password", MD5Helper.MD5Encrypt(newPassword)); * * if (DBAgent.SQLExecuteReturnRows(param) == 1) * { * return true; * } * else * { * return false; * } * } * else * { * return false; * } * } * //*/ public bool ChangePassword(string name, string newPassword, string oldPassword) { SQLExecuteParam param = new SQLExecuteParam(); CommDAL DBAgent = new CommDAL(ConfigurationManager.ConnectionStrings["DALconnect2"].ConnectionString); param.procedureParam.Add("@yh", name, DbType.String, direction: ParameterDirection.Input); param.procedureParam.Add("@ymm", oldPassword, DbType.String, direction: ParameterDirection.Input); param.procedureParam.Add("@xmm", newPassword, DbType.String, direction: ParameterDirection.Input); param.procedureParam.Add("@f", 0, DbType.Int32, direction: ParameterDirection.Output); param.procedureParam.Add("@result", "", DbType.String, direction: ParameterDirection.Output); param.sql = "lc0089999.KHCX_MMXG"; DBAgent.SQLExecuteProcedure(param); int f = param.procedureParam.Get <int>("@f"); string result = param.procedureParam.Get <string>("@result"); if (f == 1) { return(true); } return(false); }
public BaseBll() { if (dal == null) { dal = new CommDAL <TEntity>(); } if (employeeBll == null) { employeeBll = new EmployeeBLL(); } if (empPostbll == null) { empPostbll = new EmployeePostBLL(); } //if (Orgclinet == null) //{ // Orgclinet = new OrganizationService(); //} if (outInterfaceClient == null) { //outInterfaceClient = new BLLCommonServices.WFPlatformWS.OutInterfaceClient(); } }