public void BindDataByCompanyID(string CompanyID, bool bAddSelectAll, string RoleCode, string AreaCode) { string strwhere = " 1=1 "; if (!String.IsNullOrWhiteSpace(CompanyID)) { strwhere += " and CompanyID=" + CompanyID; } if (!String.IsNullOrWhiteSpace(RoleCode) && !String.IsNullOrWhiteSpace(AreaCode)) { strwhere += " and RoleID in(SELECT a1.RoleID from T_Role a1 INNER JOIN T_Company b1 "; strwhere += " ON a1.CompanyID=b1.CompanyID AND b1.Area_Code='" + AreaCode + "' "; strwhere += " and LOWER(a1.RoleCode)='" + RoleCode.ToLower() + "')"; } List <T_UsersInfo_MDL> userlist = new List <T_UsersInfo_MDL>(); T_UsersInfo_BLL userBLL = new T_UsersInfo_BLL(); userlist = userBLL.DataTableToList(userBLL.GetList(0, strwhere, "userid").Tables[0]); if (bAddSelectAll == true) { T_UsersInfo_MDL mdl = new T_UsersInfo_MDL(); mdl.UserID = 0; mdl.UserName = "******"; userlist.Insert(0, mdl); } ddlUser.DataTextField = "username"; ddlUser.DataValueField = "userid"; ddlUser.DataSource = userlist; ddlUser.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(CompanyReg1Edit)); MyAddInit(); CompanyType = DNTRequest.GetQueryInt("CompanyType", 0); if (!this.IsPostBack) { if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.VIEW) { btnSave.Visible = false; } ctrlCompanyBaseInfo1.DataBindEx(ConvertEx.ToInt(ID)); ctrlCompanyBaseInfo1.SetCompanyTypeEnable(false); ctrlCompanyBaseInfo1.CompanyTypeID = CompanyType.ToString(); ctrlCompanyBaseInfo1.SetAreaCodeEnable(false); if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.EDIT) { List <T_UsersInfo_MDL> ltUserInfo = new T_UsersInfo_BLL().GetModelList("CompanyID=" + ID); if (ltUserInfo.Count > 0) { HidUserID.Value = ConvertEx.ToString(ltUserInfo[0].UserID); txtLogName.Text = ltUserInfo[0].LoginName; txtLogName.enabled = false; txtPwd.Attributes("value", DESEncrypt.Decrypt(ltUserInfo[0].Passwd)); txtPwd2.Attributes("value", DESEncrypt.Decrypt(ltUserInfo[0].Passwd)); ViewState["UserID"] = ConvertEx.ToString(ltUserInfo[0].UserID); } } } }
/// <summary> /// 新增培训记录 /// </summary> /// <param name="TrainPlanID"></param> /// <param name="ltUserID"></param> protected void AddTrainRec(int TrainPlanID, List <string> ltUserID) { if (ltUserID.Count > 0) { foreach (string UserID in ltUserID) { if (Common.ConvertEx.ToInt(UserID) > 0) { T_Train_Rec_MDL trMDL = new T_Train_Rec_MDL(); trMDL.UserID = Common.ConvertEx.ToInt(UserID); trMDL.TrainPlanID = TrainPlanID; new T_Train_Rec_BLL().Add(trMDL); //更改用户的培训记录 T_UsersInfo_BLL uiBll = new T_UsersInfo_BLL(); T_UsersInfo_MDL uiMdl = uiBll.GetModel(Common.ConvertEx.ToInt(UserID)); int TrainCount = Common.ConvertEx.ToInt(uiMdl.TrainCount);//得到档案员的当前培训次数 uiMdl.TrainCount = TrainCount + 1; uiBll.Update(uiMdl); } } } }
protected string GetUserName(int userID) { T_UsersInfo_MDL Mdl = new T_UsersInfo_BLL().GetModel(userID); if (Mdl != null) { return(Common.ConvertEx.ToString(Mdl.UserName)); } else { return(""); } }
/// <summary> /// 根据公司ID获取公司用户,一个公司对应一个账号 /// </summary> /// <param name="companyID"></param> /// <returns></returns> T_UsersInfo_MDL GetUserInfoMdl(string companyID) { T_UsersInfo_MDL userMdl = null; T_UsersInfo_BLL userBLL = new T_UsersInfo_BLL(); IList <T_UsersInfo_MDL> ltAjMdl = userBLL.GetModelList("CompanyID=" + companyID + ""); if (ltAjMdl != null && ltAjMdl.Count > 0) { userMdl = ltAjMdl[0]; } return(userMdl); }
protected void Page_Load(object sender, EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(OutHelpCompanyAdd)); MyAddInit(); txtFileList.Attributes("onkeydown", "return false"); if (!this.IsPostBack) { ctrlOutHelpRole.DataBindEx(null, SystemSet._OUTHELP_ROLETYPE); if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.VIEW) { btnSave.Visible = false; ctrlOutHelpRole.Enabled = false; } ctrlCompanyBaseInfo1.DataBindEx(ConvertEx.ToInt(ID)); ctrlCompanyBaseInfo1.SetCompanyTypeEnable(false); ctrlCompanyBaseInfo1.CompanyTypeID = CompanyType; ctrlCompanyBaseInfo1.SetAreaCodeEnable(false); if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.EDIT) { ctrlOutHelpRole.Enabled = false; if (PublicModel.isSuperAdmin()) { ctrlOutHelpRole.Enabled = true; } List <T_UsersInfo_MDL> ltUserInfo = new T_UsersInfo_BLL().GetModelList("CompanyID=" + ID); if (ltUserInfo.Count > 0) { HidUserID.Value = ConvertEx.ToString(ltUserInfo[0].UserID); txtLogName.Text = ltUserInfo[0].LoginName; txtLogName.enabled = false; ctrlOutHelpRole.SelectValue = ltUserInfo[0].RoleID.ToString(); txtPwd.Attributes("value", DESEncrypt.Decrypt(ltUserInfo[0].Passwd)); txtPwd2.Attributes("value", DESEncrypt.Decrypt(ltUserInfo[0].Passwd)); txtFileList.Attributes("value", ltUserInfo[0].OwnerFileTmp); ViewState["UserID"] = ConvertEx.ToString(ltUserInfo[0].UserID); } } } }
public string AllotSingleProject(string SingleProjectID, string ChargeUserID, string WorkFlowID) { try { //激活工程 T_SingleProject_MDL singleProjectMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(SingleProjectID)); singleProjectMDL.Status = 1; int CompanyID = 0; #region 没有工程编号则生成 if (String.IsNullOrEmpty(singleProjectMDL.gcbm)) { T_Other_BLL otherBLL = new T_Other_BLL(); singleProjectMDL.gcbm = otherBLL.GetNewEngineerID(); singleProjectBLL.Update(singleProjectMDL); //产生工程号 T_Construction_Project_BLL cpBLL = new T_Construction_Project_BLL(); Model.T_Construction_Project_MDL cpMDL = cpBLL.GetModel(singleProjectMDL.ConstructionProjectID); if (cpMDL != null) { CompanyID = cpMDL.CompanyID; //建设单位ID if (String.IsNullOrEmpty(cpMDL.xmh)) { cpMDL.xmh = otherBLL.GetNewProjectID(); cpBLL.Update(cpMDL); //更新项目号 } } } #endregion #region 激活用户 T_UsersInfo_BLL userBLL = new T_UsersInfo_BLL(); T_UsersInfo_MDL userMDL = userBLL.GetModel(singleProjectMDL.CompanyUserID); if (userMDL != null) { userMDL.IsValid = true; userBLL.Update(userMDL); } #endregion #region 修改工程分配信息 if (singleProjectMDL != null) { singleProjectMDL.AllotDate = DateTime.Now; //分配时间 singleProjectMDL.AllotUserID = ConvertEx.ToInt(Common.Session.GetSession("UserId")); //分配人员 singleProjectMDL.ChargeUserID = ConvertEx.ToInt(ChargeUserID); //业务指导人员 singleProjectBLL.Update(singleProjectMDL); } #endregion #region 添加建设单位归档目录 string iSignaturePdf = "0"; //文件是否需要签章 string iSignatureWorkFlow = "0"; //是否按签章流程签章 if (ConvertEx.ToBool(SystemSet._ISIGNATUREPDF)) { iSignaturePdf = "1"; iSignatureWorkFlow = "1"; } new UserOperate().CopyFileList(CompanyID, singleProjectMDL.CompanyUserID, "", singleProjectMDL.SingleProjectID, singleProjectMDL.ProjectType, iSignaturePdf, iSignatureWorkFlow); #endregion #region 把业务指导人员用户加入到这个工程用户中去 T_UsersInfo_MDL ChargeUserMDL = userBLL.GetModel(Common.ConvertEx.ToInt(ChargeUserID)); PublicModel.AddSingleProjectUser(singleProjectMDL.SingleProjectID, ChargeUserMDL); #endregion #region 相关流程的用户也需要加入,否则流程走不下去===现在有了受理,可以达到这个功能,不需要加了。让用户受理下来。受理还没做完呢? SingleProjectUser projectRole = new SingleProjectUser(); BLL.T_WorkFlow_BLL workFlowBLL = new T_WorkFlow_BLL(); DataSet workFlowDS = workFlowBLL.GetList(" OrderIndex=1 "); if (workFlowDS.Tables.Count > 0) { foreach (DataRow row in workFlowDS.Tables[0].Rows) { projectRole.Update(singleProjectMDL.SingleProjectID, Common.ConvertEx.ToInt(row["RoleID"]), Common.ConvertEx.ToInt(row["UserID"])); } } #endregion #region 发送邮件通知客户 if (SystemSet._ACCEPTSINGLE_SENDEMAILFLAG) { string strMsgBody = "您好!<br />"; strMsgBody += "您报建的工程:" + singleProjectMDL.gcmc + ",已确认通过,产生的工程编号是:" + singleProjectMDL.gcbm + ",您现在已经可以通过注册时的账号密码登记系统操作了!"; T_UsersInfo_MDL CompanyUserMDL = userBLL.GetModel(singleProjectMDL.CompanyUserID); Common.CSendEmail.SendEmail("档案馆", CompanyUserMDL.EMail, "工程报建确认通知", strMsgBody, ""); } #endregion #region 提交到下一个流程 WorkFlowManage workflowmanage = new WorkFlowManage(); workflowmanage.GoNextProjectWorkFlowSataus(singleProjectMDL.SingleProjectID, ConvertEx.ToInt(WorkFlowID)); #endregion #region 将指导人员指导环节的所有 [受理]全部 做,这样,除了管理员和受理人员外,其他人都看不到流程下的工程 T_WorkFlowDefine_BLL workFlowDefineBLL = new T_WorkFlowDefine_BLL(); IList <T_WorkFlowDefine_MDL> workFlowDefineLT = workFlowDefineBLL.GetModelList(" SingleProjectID=" + singleProjectMDL.SingleProjectID + " and WorkFlowID in(" + SystemSet._DEFAULT_RECV_WORKFLOWID + ") "); if (workFlowDefineLT != null && workFlowDefineLT.Count > 0) { foreach (T_WorkFlowDefine_MDL wkdMDL in workFlowDefineLT) { wkdMDL.SubmitStatus = 2;//受理完成状态 wkdMDL.RecvUserID = Common.ConvertEx.ToInt(ChargeUserID); wkdMDL.RecvDateTime = DateTime.Now; workFlowDefineBLL.Update(wkdMDL); } } #endregion return(singleProjectMDL.gcbm); } catch (Exception ex) { return(SystemSet._RETURN_FAILURE_VALUE + ex.Message); } }
/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { T_SingleProject_MDL spModel = new T_SingleProject_MDL(); spModel = ctrlCompanyRegBaseInfo3_11.GetModule(ConvertEx.ToInt(SingleProjectID)); a_single_project_MDL a_Single_Mdl = new a_single_project_MDL(); a_Single_Mdl = ctrlCompanyRegBaseInfo3_1Ext1.GetModule(ConvertEx.ToInt(SingleProjectID)); a_Single_Mdl.fz = spModel.fz; if (spModel != null) { if (spModel.SingleProjectID <= 0 || (CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.ADD) { #region 添加工程信息 spModel.ConstructionProjectID = ConvertEx.ToInt(ctrlDropDownConstructionProject1.SelectValue); spModel.ProjectType = ctrlArchiveFormType1.SelectValue; spModel.AREA_CODE = AREA_CODE.SelectValue; spModel.gcbm = ""; string UserID = ""; if (Common.Session.GetSession("tUserID") != "") { UserID = Common.Session.GetSession("tUserID"); } else if (Common.Session.GetSession("UserID") != "") { UserID = Common.Session.GetSession("UserID"); } spModel.CompanyUserID = Common.ConvertEx.ToInt(UserID); spModel.CreateDate = DateTime.Now; spModel.Status = 0; int tmpSingleProjectID = singleProjectBLL.Add(spModel); #endregion #region 添加工程流程环节 new T_WorkFlowDefine_BLL().AddWorkFlowDefine(tmpSingleProjectID, spModel.AREA_CODE); #endregion #region 更新当前用户为本工程管理员 T_UsersInfo_BLL userBll = new T_UsersInfo_BLL(); T_UsersInfo_MDL userMdl = userBll.GetModel(Common.ConvertEx.ToInt(UserID)); userMdl.IsLeader = true; userBll.Update(userMdl); #endregion #region 把此用户加入到这个工程用户中去 SingleProjectUser projectRole = new SingleProjectUser(); projectRole.Update(tmpSingleProjectID, userMdl.RoleID, userMdl.UserID); #endregion #region 加入到工程->公司表中去 T_SingleProjectCompany_MDL spcMDL = new T_SingleProjectCompany_MDL(); spcMDL.SingleProjectID = tmpSingleProjectID; spcMDL.CompanyID = Common.Session.GetSessionInt("CompanyID"); T_SingleProjectCompany_BLL spcBLL = new T_SingleProjectCompany_BLL(); spcBLL.Add(spcMDL); #endregion #region 房屋专业记载 a_Single_Mdl.SingleProjectID = tmpSingleProjectID; if (asingleProjectBLL.Exists(tmpSingleProjectID)) { asingleProjectBLL.Update(a_Single_Mdl); } else { asingleProjectBLL.Add(a_Single_Mdl); } #endregion #region 日志 PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_SingleProject;key=", tmpSingleProjectID, ";ProjectType=", spModel.ProjectType, ";gcbm=", spModel.gcbm, ";gcmc=", spModel.gcmc)); #endregion } else { #region 更新工程信息 singleProjectBLL.Update(spModel); #endregion #region 判断工程,如果没有专业记载,则新增,否则修改 if (ConvertEx.ToInt(a_Single_Mdl.SingleProjectID) > 0) { asingleProjectBLL.Update(a_Single_Mdl); } else { a_Single_Mdl.SingleProjectID = spModel.SingleProjectID; asingleProjectBLL.Add(a_Single_Mdl); } #endregion #region 日志 PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_SingleProject;key=", spModel.SingleProjectID, ";ProjectType=", spModel.ProjectType, ";gcbm=", spModel.gcbm, ";gcmc=", spModel.gcmc)); #endregion } } Common.MessageBox.CloseLayerOpenWeb(this.Page); }
private string InsertFileList(XmlNode xmlNode) { string rtMsg = string.Empty; try { #region 新增文件信息 T_FileList_MDL fileMDL = new T_FileList_MDL(); string singleProjectID = xmlNode["SINGLEPROJECTID"].InnerText; //工程ID string operateUserID = xmlNode["OPERATEUSERID"].InnerText; //当前用户ID string pid = xmlNode["PID"].InnerText; //文件所属类别ID pid = GetFilePID(pid, xmlNode["FROMRECID"].InnerText, xmlNode["FROMTYPE"].InnerText); if (ConvertEx.ToInt(pid) < 1) { rtMsg = "传入的PID匹配失败!"; return(rtMsg); } T_UsersInfo_MDL userMDL = new T_UsersInfo_BLL().GetModel(ConvertEx.ToInt(operateUserID)); if (userMDL != null) { fileMDL.OperateUserID = userMDL.UserID; fileMDL.CompanyID = userMDL.CompanyID; T_Company_MDL companyMDL = new T_Company_BLL().GetModel(userMDL.CompanyID); if (companyMDL != null) { fileMDL.DefaultCompanyType = companyMDL.CompanyType; } } //记录文件在模板中对应的recid fileMDL.OldRecID = ConvertEx.ToInt(fileBLL.GetRecID(xmlNode["FROMRECID"].InnerText, xmlNode["FROMTYPE"].InnerText)); fileMDL.recID = fileBLL.GetMaxRecID(singleProjectID); fileMDL.PID = ConvertEx.ToInt(pid); fileMDL.IsFolder = false; IList <T_FileList_MDL> ltMDL = fileBLL.GetModelList("SingleProjectID=" + singleProjectID + " and recid=" + pid + ""); if (ltMDL != null && ltMDL.Count > 0) { fileMDL.BH = new T_Other_BLL().GetBH(singleProjectID, ltMDL[0].FileListID.ToString()); } fileMDL.PagesCount = ConvertEx.ToInt(xmlNode["PDFCOUNT"].InnerText); //PDF页数 fileMDL.ManualCount = ConvertEx.ToInt(xmlNode["PDFCOUNT"].InnerText); //实体页数 fileMDL.shr_3 = "0"; fileMDL.w_t_h = xmlNode["FILEID"].InnerText; fileMDL.SingleProjectID = ConvertEx.ToInt(xmlNode["SINGLEPROJECTID"].InnerText); fileMDL.zrr = xmlNode["ZRR"].InnerText; fileMDL.Title = xmlNode["TITLE"].InnerText; fileMDL.CreateDate = DateTime.Now; //文件登记时间 fileMDL.StartTime = xmlNode["START_DATE"].InnerText; fileMDL.CONVERT_DT = DateTime.Now.ToString("yyyy-MM-dd"); // xmlNode["START_DATE"].InnerText; fileMDL.CONVERT_FLAG = true; fileMDL.PDFFilePath = xmlNode["PDFFILEPATH"].InnerText; //合并的PDF文件名称 fileMDL.RootPath = Common.Common.EFileStartPath; //PDF存放路径 fileMDL.FROM_SID = xmlNode["SID"].InnerText; //筑业过来的文件SID,二次导入时据此判断 fileMDL.IsMerge = xmlNode["IsMerge"].InnerText; //合并后的PDF,还是单张表格的PDF fileMDL.Status = "10"; //已登记 fileMDL.OldStatus = "10"; fileMDL.SIGNATURE_FLAG = false; //导入不能为已签章@tyy20160326 int fileListID = fileBLL.Add(fileMDL); #endregion #region 关联文件对应的附件信息,先删除后添加 T_EFile_OutSideRelated_BLL efileOutSideRelatedBLL = new T_EFile_OutSideRelated_BLL(); efileOutSideRelatedBLL.DelEfileOutSideRelated(fileListID.ToString(), xmlNode["FROMTYPE"].InnerText); if (!string.IsNullOrWhiteSpace(xmlNode["EFILE_OUTSIDERELATED"].InnerText)) { string[] spEfileOutSideRelated = (xmlNode["EFILE_OUTSIDERELATED"].InnerText + ",").Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (var fromID in spEfileOutSideRelated) { T_EFile_OutSideRelated_MDL efileOutSideRelatedMDL = new T_EFile_OutSideRelated_MDL(); efileOutSideRelatedMDL.FileListID = fileListID.ToString(); efileOutSideRelatedMDL.FromID = fromID; efileOutSideRelatedMDL.FromType = xmlNode["FROMTYPE"].InnerText; efileOutSideRelatedBLL.Add(efileOutSideRelatedMDL); } } #endregion rtMsg = SystemSet._RETURN_SUCCESS_VALUE; } catch (Exception ex) { rtMsg = "failure:" + ex.Message; } return(rtMsg); }
/// <summary> /// 用户登录 /// </summary> /// <param name="context"></param> /// <returns></returns> public string getUserInfo(HttpContext context) { try { if (context.Request.Form["username"] == null || context.Request.Form["password"] == null) { return("账号或密码为空!"); } T_UsersInfo_BLL userinfobll = new T_UsersInfo_BLL(); string strPrivateKey = string.Empty; using (StreamReader reader = new StreamReader(context.Server.MapPath("/RsaKey/PrivateKey.xml"))) { strPrivateKey = reader.ReadToEnd(); } RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); rsa.FromXmlString(strPrivateKey); byte[] result = rsa.Decrypt(UserLoginGather.HexStringToBytes(context.Request.Form["password"]), false); System.Text.ASCIIEncoding enc = new ASCIIEncoding(); string rsaPwd = enc.GetString(result); string loginString = "UPPER(loginname)='" + Common.Common.SqlSafe(context.Request.Form["username"]).ToUpper() + "' and passwd='" + DESEncrypt.Encrypt(rsaPwd) + "' "; List <T_UsersInfo_MDL> userinfomdl = userinfobll.GetModelList(loginString); if (userinfomdl.Count > 0) { if (userinfomdl[0].IsValid == true) { T_Company_BLL compBLL = new T_Company_BLL(); T_Company_MDL compMDL = compBLL.GetModel(userinfomdl[0].CompanyID); if (compMDL != null) { context.Session["IsCompany"] = compMDL.IsCompany.ToString().ToLower(); context.Session["CompanyName"] = compMDL.CompanyName; context.Session["OLD_AREA_CODE"] = compMDL.AREA_CODE; context.Session["AREA_CODE"] = ""; if (compMDL.IsCompany.ToString().ToLower() == "false") //只有档案馆,需要区域信息,建设单位等都不要过虑 { string myArea_Code = compMDL.AREA_CODE; string myArea_CodeNew = compMDL.AREA_CODE; for (int i1 = myArea_Code.Length - 1; i1 > 0; i1--) { if (myArea_Code[i1].ToString() == "0") { myArea_CodeNew = myArea_Code.Substring(0, i1); } else { break; } } context.Session["AREA_CODE"] = myArea_CodeNew; } context.Session["CompanyType"] = compMDL.CompanyType; } else { return(SystemSet._RETURN_FAILURE_VALUE + ":单位信息不存在!"); } BLL.T_SystemInfo_BLL systemInfoBLL = new T_SystemInfo_BLL(); Model.T_SystemInfo_MDL systemInfoMDL = systemInfoBLL.GetModel(compMDL.CompanyType); if (systemInfoMDL == null) { return(SystemSet._RETURN_FAILURE_VALUE + ":单位类型字典不存在!"); } context.Session["CompanyTypeName"] = systemInfoMDL.SystemInfoName; context.Session["CompanyTypeCode"] = systemInfoMDL.SystemInfoCode; context.Session["SystemInfoID"] = systemInfoMDL.SystemInfoID; context.Session["MyParentID"] = systemInfoMDL.ParentID; context.Session["UserID"] = userinfomdl[0].UserID; context.Session["LoginName"] = userinfomdl[0].LoginName; context.Session["UserName"] = userinfomdl[0].UserName; context.Session["RoleID"] = userinfomdl[0].RoleID; context.Session["CompanyID"] = userinfomdl[0].CompanyID; context.Session["IsLeader"] = userinfomdl[0].IsLeader; context.Session["SuperAdmin"] = userinfomdl[0].IsSuperAdmin; context.Session["OwnerFileTmp"] = userinfomdl[0].OwnerFileTmp; //外协单位用户 T_Role_MDL roleMDL = new T_Role_BLL().GetModel(userinfomdl[0].RoleID); //签章用 if (roleMDL != null) { context.Session["RoleName"] = roleMDL.RoleName; context.Session["RoleCode"] = roleMDL.RoleCode; } TimeSpan ts = new TimeSpan(8760, 0, 0); DateTime expired = DateTime.Today.Add(ts); HttpContext.Current.Response.Cookies["LoginName"].Value = context.Server.UrlEncode(userinfomdl[0].LoginName); HttpContext.Current.Response.Cookies["LoginName"].Expires = expired; //修改最后登录时间 userinfomdl[0].LastLoginTime = DateTime.Now; userinfobll.Update(userinfomdl[0]); PublicModel.writeLog(SystemSet.EumLogType.LogIn.ToString(), ";用户登录系统"); return(SystemSet._RETURN_SUCCESS_VALUE); } else { return("如果您已经成功注册,请等待确认后再登录!"); } } else { return("用户账号或密码错误!"); } } catch (Exception ex) { Common.LogUtil.Debug(this, "用户登录BUG", ex); return("系统异常,请稍后再试"); } }