public static Object getGroupsList(int UG_UType) { BL_UserEntity groups = new CRMTree.BLL.BL_UserEntity(); MD_GroupsList myCarModel = groups.getGroupsList(UG_UType); return(myCarModel); }
/// <summary> /// 设置文档下载的文件名 /// </summary> /// <returns></returns> private string SetDownFileName() { MD_UserEntity _user = BL_UserEntity.GetUserInfo(); if (_user == null) { return(null); } bool _In = false; if (Language.GetLang2() == EM_Language.en_us) { _In = true; } _c = RP.GetReplaceReport(_In, new CT_Param_Value() { RP_Code = _c.RP_Code, PV_Type = _PR, PV_CG_Code = -1, PV_UType = _user.User.UG_UType, PV_AD_OM_Code = _user.DealerEmpl.DE_AD_OM_Code }); if (_c == null) { return(null); } _sheetTitle = _c.RP_Name_EN.Trim(); return(_c.RP_Name_EN.Trim() + "_" + _user.User.AU_Code + "_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".xls"); }
/// <summary> /// 次方法针对Report Run后 提供调用列表的列表Code /// </summary> /// <param name="RP_Code"></param> /// <returns></returns> public string GetFields_List_Code(int RP_Code) { string _eer = "-1"; bool _In = false; MD_UserEntity _user = BL_UserEntity.GetUserInfo(); if (_user == null) { return(_eer); } Fields_list FL = _D_re.GetFields_list(RP_Code); if (FL == null || FL.List == null) { return(_eer); } if (Language.GetLang2() == EM_Language.en_us) { _In = true; } CT_Reports o = GetReplaceReport(_In, new CT_Param_Value() { RP_Code = RP_Code, PV_Type = 0, PV_CG_Code = -1, PV_UType = _user.User.UG_UType, PV_AD_OM_Code = _user.DealerEmpl.DE_AD_OM_Code }); if (o == null) { return(_eer); } _D_re.insertReport_Hist(_user.User.AU_Code, RP_Code, o.RP_Query, o.RP_Name_EN, o.RP_Name_CN); return(FL.List[0].FL_Code.ToString()); }
/// <summary> /// 保存个人信息 /// </summary> /// <param name="data"></param> /// <returns></returns> private long Save_Personal(dynamic data) { var s_personal = JsonConvert.SerializeObject(data.personal); CRMTree.Model.CT_All_Users personal = JsonConvert.DeserializeObject <CRMTree.Model.CT_All_Users>(s_personal); CRMTree.Model.CT_Drivers_List_New drivermodel = JsonConvert.DeserializeObject <CRMTree.Model.CT_Drivers_List_New>(s_personal); if (!string.IsNullOrWhiteSpace(personal.AU_Username)) { if (CT_All_User.Exists("AU_Code != @0 and AU_Username = @1", personal.AU_Code, personal.AU_Username)) { throw new Exception(Interna ? "User account already exists!" : "用户账号已存在!"); } } if (string.IsNullOrWhiteSpace(personal.AU_Name)) { throw new Exception(Interna ? "NOT NULL!" : "姓名不能为空!"); } long?au_code = data.AU_Code; personal.AU_Update_dt = DateTime.Now; //更新个人资料 CRMTree.BLL.BL_UserEntity bll = new CRMTree.BLL.BL_UserEntity(); if (!string.IsNullOrWhiteSpace(personal.AU_Password)) { if (!bll.ExistsPwd(personal.AU_Password, personal.AU_Username)) { personal.AU_Password = ShInfoTech.Common.Security.Md5(personal.AU_Password); } } int isSuccess = 0; if (au_code != null) //添加 { bll.Update_CT_All_Users(personal); drivermodel.MAU_Code = data.MAU_Code; } isSuccess = bll.add_personal(drivermodel); if (isSuccess > 0) { if (au_code == null) { au_code = bll.getMaxAU_Code(); } return((long)au_code); } else { return(isSuccess); } }