//根据用户编号查询相关信息 public static string GetUser(string userNo, int typeid) { Model.YH_user M_YH_user = new Model.YH_user(); BLL.YH_user B_YH_user = new BLL.YH_user(); string struserinfo = ""; M_YH_user = B_YH_user.GetModelList("yhbh='" + userNo + "'" + common_app.yydh_select + "")[0]; if (typeid == 1) { struserinfo = M_YH_user.yhmm; } else if (typeid == 2) { struserinfo = M_YH_user.yhxm; } else if (typeid == 3) { struserinfo = M_YH_user.R_lsbh; } else { struserinfo = M_YH_user.RoleName; } return(struserinfo); }
//ID,yydh,qymc,yhbh,yhxm,yhmm,R_lsbh,RoleName,is_top,is_select public string YHUser_add_edit(string id, string yydh, string qymc, string yhbh, string yhxm, string yhmm, string R_lsbh, string R_RolesName, string yhbm, string add_edit_delete, string xxzs) { string s = common_file.common_app.get_failure; BLL.YH_user B_Yhuser = new BLL.YH_user(); Model.YH_user M_Yhuser = new Model.YH_user(); if (xxzs == common_file.common_app.xxzs_xxvalue) { } if (xxzs == common_file.common_app.xxzs_zsvalue) { } if (add_edit_delete == common_file.common_app.get_add) { M_Yhuser.yydh = yydh; M_Yhuser.qymc = qymc; M_Yhuser.yhbh = yhbh; M_Yhuser.yhxm = yhxm; M_Yhuser.R_lsbh = R_lsbh; M_Yhuser.RoleName = R_RolesName; M_Yhuser.yhmm = yhmm; M_Yhuser.yhbm = yhbm; if (B_Yhuser.Add(M_Yhuser) > 0) { s = common_file.common_app.get_suc; } } else if (add_edit_delete == common_file.common_app.get_edit) { M_Yhuser = B_Yhuser.GetModel(Convert.ToInt32(id)); M_Yhuser.RoleName = R_RolesName; M_Yhuser.R_lsbh = R_lsbh; M_Yhuser.yhxm = yhxm; M_Yhuser.yhbm = yhbm; //M_Yhuser.yhmm = yhmm; M_Yhuser.ID = Convert.ToInt32(id); B_Yhuser.Update(M_Yhuser); s = common_file.common_app.get_suc; } else if (add_edit_delete == common_file.common_app.get_delete) { if (id != "") { B_Yhuser.Delete(Convert.ToInt32(id)); s = common_file.common_app.get_suc; } } return(s); }
//邦定用户ComboBox列表 public static void Bindyh(ComboBox cB_hyrx) //会员类型邦定 { cB_hyrx.Items.Clear(); Model.YH_user M_YH_user = new Model.YH_user(); BLL.YH_user B_YH_user = new BLL.YH_user(); List <Model.YH_user> list = B_YH_user.GetModelList(""); if (list.Count > 0) { for (int i = 0; i < list.Count; i++) { cB_hyrx.Items.Add(list[i].yhxm.ToString()); } } }