public UserAction GetUserDetails(string UserName) { try { oDatabaseHandler = new DatabaseHandler(); DataSet oDataSet = new DataSet(); oDataSet = oDatabaseHandler.FillData("select U.UserId,U.RoleId,R.[Role] RoleName,R.[Create],R.Edit,R.[View],R.Assign,R.Finish from Users as U " + " inner join Roles R on R.RoleId=U.RoleId" + " where U.UserName='******'"); if (oDataSet != null && oDataSet.Tables != null && oDataSet.Tables.Count > 0 && oDataSet.Tables[0].Rows != null && oDataSet.Tables[0].Rows.Count > 0) { UserAction oUserDetails = new UserAction(); //oUserDetails.Cus = int.Parse(oDataSet.Tables[0].Rows[0]["UserId"].ToString()); oUserDetails.UserName = UserName;// oDataSet.Tables[0].Rows[0]["UserId"].ToString(); oUserDetails.RoleID = int.Parse(oDataSet.Tables[0].Rows[0]["RoleId"].ToString()); oUserDetails.RoleName = oDataSet.Tables[0].Rows[0]["RoleName"].ToString(); oUserDetails.Create = bool.Parse(oDataSet.Tables[0].Rows[0]["Create"].ToString()); oUserDetails.Edit = bool.Parse(oDataSet.Tables[0].Rows[0]["Edit"].ToString()); oUserDetails.View = bool.Parse(oDataSet.Tables[0].Rows[0]["View"].ToString()); oUserDetails.Assign = bool.Parse(oDataSet.Tables[0].Rows[0]["Assign"].ToString()); oUserDetails.Finish = bool.Parse(oDataSet.Tables[0].Rows[0]["Finish"].ToString()); return oUserDetails; } return null; } catch (Exception ex) { } return null; }
public UserAction GetUserDetails(string UserName, string Password) { try { SimpleAES oSimpleAES = new SimpleAES(); Regex oRegex = new Regex(@"^[a-zA-Z0-9_]+$"); if (oRegex.IsMatch(UserName)) { string sPassword= oWebHutData.GetPassword(UserName); if (sPassword != "" && oSimpleAES.DecryptString(sPassword) == Password) { UserAction oUserDetails = new UserAction(); oUserDetails=oWebHutData.GetUserDetails(UserName); return oUserDetails; } } return null; } catch (Exception ex) { } return null; }
public bool SetUserAction(UserAction oUserAction) { try { DatabaseHandler oDBH = new DatabaseHandler(); StringBuilder _sbQuery = new StringBuilder(); int i = oDBH.ExecuteNonQuery_SP("SetUserAction", oUserAction.CustomerId, oUserAction.PreferenceID1, 'N', oUserAction.SubDomainName1, oUserAction.YoutubeURL1, oUserAction.CustomTabName1, oUserAction.TemplateId, oUserAction.SiteID1); if (i < 0) return false; else return true; } catch (Exception ex) { throw ex; } }
public bool SetUserAction(UserAction oUserAction) { try { return fbDALC.SetUserAction(oUserAction); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { try { oUserDetails = SessionData.UserAction; CKEditor1.config.enterMode = EnterMode.BR; GetSiteDetails(); Bind_ddlPagesList(); BindTemplatePages(ddlPagesList.SelectedValue); } catch (Exception ex) { objCommonUtil.SendErrorMail(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString(), SessionData.Customer.CustomerID); } }
protected void Page_Load(object sender, EventArgs e) { try { oUserDetails = SessionData.UserAction; CKEditor1.config.enterMode = EnterMode.BR; //CKEditor1.config.customConfig=cust GetSiteDetails(); Bind_ddlPagesList(); BindTemplatePages(ddlPagesList.SelectedValue); } catch (Exception ex) { } }