//Retrieve the dashboard from the database public void retrieveDashboard() { dashboard = new DashboardClass(); dashboard.dashboardId = dashboardId; dashboard.retrieve(); dashboardTitle = dashboard.title; }
public static void Init(AppPressDemo p, DashboardClass Dashboard) { Dashboard.Description.val = @"<span style='font-size:32px'>Advanced Skin Transformation <a href='https://docs.google.com/document/d/1goW6BxoZp1WK12ZCcmg8RqVgADifn8yYZSZoGjpUeRo/edit#heading=h.p0odykvmemlj' target='_blank'><i class=""fa fa-question-circle""></i></a></span>"; Dashboard.Logins.val = p.ExecuteDecimal(@"Select count(*) From application_audit Where AuditType=" + (int)AuditType.Login); Dashboard.Help.val = "http://AppPress.in"; }
//Inserts the dashboard public void insertDashboard() { dashboard = new DashboardClass(); dashboard.title = dashboardTitle; dashboard.userId = Session["LoggedInUserId"].ToString(); dashboard.templateFileName = templateFileName; dashboardId = dashboard.insert(); assignDashboardIds(); }
public DashboardClass GetPartnerProfilesDal(int?CustID, string TypeOfReport, int pagefrom, int pageto, string spName) { DashboardClass land = new DashboardClass(); List <PartnerProfilesLatest> PartnerLi = new List <PartnerProfilesLatest>(); SqlDataReader reader; SqlConnection con = null; try { SqlParameter[] parm = new SqlParameter[6]; parm[0] = new SqlParameter("@custID", SqlDbType.Int); parm[0].Value = CustID; parm[1] = new SqlParameter("@TypeOfReport", SqlDbType.VarChar); parm[1].Value = TypeOfReport; parm[2] = new SqlParameter("@pagefrom", SqlDbType.Int); parm[2].Value = pagefrom; parm[3] = new SqlParameter("@pageto", SqlDbType.Int); parm[3].Value = pageto; using (con = new SqlConnection(ConfigurationManager.ConnectionStrings["KakConnection"].ToString())) { con.Open(); reader = SQLHelper.ExecuteReader(con, CommandType.StoredProcedure, spName, parm); if (reader.HasRows) { while (reader.Read()) { PartnerProfilesLatest Partnercls = ReturnPartnerProfilesClass(reader, "Partner"); PartnerLi.Add(Partnercls); } land.PartnerProfilesnew = PartnerLi; } reader.Close(); } } catch (Exception ex) { Commonclass.ApplicationErrorLog(spName, Convert.ToString(ex.Message), CustID, null, null); } finally { con.Close(); //SqlConnection.ClearPool(con); //SqlConnection.ClearAllPools(); } return(land); }
public ActionResult Index() { if (GlobalClass.SystemSession) { DashboardClass model = new DashboardClass(); model.CustomerObj = GlobalClass.CustomerDetail; // model.CustomerObj.Address = GlobalClass.CustomerDetail.Address + " " + GlobalClass.CustomerDetail.ZIPcode + " " + GlobalClass.CustomerDetail.CityList.CityName + " " + GlobalClass.CustomerDetail.StateList.StateName; model.FirstGrid = new List <DashboardJobClass>(); model.FirstGrid = setup.FillFirstGrid(); return(View(model)); } else { Exception e = new Exception("Sorry, your Session has Expired"); return(View("Error", new HandleErrorInfo(e, "Home", "Logout"))); } }
public static void OnClick(AppPressDemo p, LoginClass.LoginFieldClass loginField) { var login = loginField.FormData; var email = login.Email.val; var cookiePrefix = CookiePrefix(p); var password = login.Password.val; SetupSession(p, login, false); var emailCookie = p.Response.Cookies[cookiePrefix + "Email"]; var passwordCookie = p.Response.Cookies[cookiePrefix + "Password"]; if (login.RememberMe.val) { emailCookie.Value = email; passwordCookie.Value = password; emailCookie.Expires = passwordCookie.Expires = DateTime.Now.AddDays(5); } else { emailCookie.Expires = passwordCookie.Expires = DateTime.Now.AddDays(-1); } DashboardClass.Redirect(p, null, null); }
public DashboardClass LandingCountsDal(int?CustID, string TypeOfReport, int pagefrom, int pageto, string spName) { DashboardClass land = new DashboardClass(); List <PartnerProfilesLatest> PartnerLi = new List <PartnerProfilesLatest>(); SqlDataReader reader; DataSet ds = new DataSet(); DataTable dt = new DataTable(); int? inull = null; bool? bnull = null; SqlConnection con = null; Int64? Lnull = null; List <PersonalInfo> liPerson = new List <PersonalInfo>(); try { SqlParameter[] parm = new SqlParameter[6]; parm[0] = new SqlParameter("@custID", SqlDbType.Int); parm[0].Value = CustID; parm[1] = new SqlParameter("@TypeOfReport", SqlDbType.VarChar); parm[1].Value = TypeOfReport; parm[2] = new SqlParameter("@pagefrom", SqlDbType.Int); parm[2].Value = pagefrom; parm[3] = new SqlParameter("@pageto", SqlDbType.Int); parm[3].Value = pageto; using (con = new SqlConnection(ConfigurationManager.ConnectionStrings["KakConnection"].ToString())) { con.Open(); reader = SQLHelper.ExecuteReader(con, CommandType.StoredProcedure, spName, parm); if (reader.HasRows) { while (reader.Read()) { LandingPartnerMenu liCount = new LandingPartnerMenu(); { liCount.SaveSearchCount = reader["SavesSearchCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("SavesSearchCount")) : inull; liCount.WhobookmarkedCount = reader["WhoBookmarkedCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("WhoBookmarkedCount")) : inull; liCount.MybookMarkedProfCount = reader["BookmarkCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("BookmarkCount")) : inull; liCount.RectViewedProfCount = reader["ViewedCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("ViewedCount")) : inull; liCount.RectWhoViewedCout = reader["WhoViewedCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("WhoViewedCount")) : inull; liCount.IgnoreProfileCount = reader["IgnoreCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("IgnoreCount")) : inull; //express and Counts Bind liCount.ExpressIntSent = reader["ExpressSentCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("ExpressSentCount")) : inull; liCount.ExpressIntReceived = reader["ExpressReceiveCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("ExpressReceiveCount")) : inull; liCount.ExpressAllcount = reader["ExpressAllcount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("ExpressAllcount")) : inull; liCount.NewMsgs = reader["NewMessageCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("NewMessageCount")) : inull; liCount.TotalMsgs = reader["TotalMessageCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("TotalMessageCount")) : inull; liCount.SentPhotoRequestCount = reader["PhotoRequestSentCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("PhotoRequestSentCount"))) : inull; liCount.SentHoroRequestCount = reader["HoroRequestSentCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("HoroRequestSentCount"))) : inull; liCount.ReceivedPhotoRequestCount = reader["PhotoRequestReceivedCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("PhotoRequestReceivedCount"))) : inull; liCount.ReceivedHoroRequestCount = reader["HoroRequestReceivedCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("HoroRequestReceivedCount"))) : inull; liCount.SentProtectedReply = reader["SentProtectedNewCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("SentProtectedNewCount"))) : inull; liCount.SentProtectedAccept = reader["SentProtectedAcceptCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("SentProtectedAcceptCount"))) : inull; liCount.SentProtectedReject = reader["SentProtectedRejectCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("SentProtectedRejectCount"))) : inull; liCount.ReceivedProtectedNew = reader["ReceivedProtectedNewCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("ReceivedProtectedNewCount"))) : inull; liCount.ReceivedProtectedAccept = reader["ReceivedProtectedAcceptCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("ReceivedProtectedAcceptCount"))) : inull; liCount.ReceivedProtectedReject = reader["ReceivedProtectedRejectCount"] != DBNull.Value ? Convert.ToInt32(reader.GetString(reader.GetOrdinal("ReceivedProtectedRejectCount"))) : inull; land.DashBoardCounts = liCount; } } } reader.NextResult(); if (reader.HasRows) { while (reader.Read()) { PersonalInfo Pcls = new PersonalInfo(); Pcls.TableName = reader["TableName"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("TableName")) : null; Pcls.ProfileID = reader["ProfileID"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("ProfileID")) : null; Pcls.GenderID = reader["GenderID"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("GenderID")) : inull; Pcls.NAME = reader["NAME"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("NAME")) : null; Pcls.PaidMember = reader["PaidMember"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("PaidMember")) : inull; Pcls.ProfileLastModifieddate = reader["ProfileLastModifieddate"] != DBNull.Value ? (reader.GetDateTime(reader.GetOrdinal("ProfileLastModifieddate"))).ToString() : null; Pcls.PhotoName = reader["PhotoName"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("PhotoName")) : null; Pcls.PhotoName_Cust = reader["PhotoName_Cust"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("PhotoName_Cust")) : inull; Pcls.MsgReceivedFrom = reader["MsgReceivedFrom"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("MsgReceivedFrom")) : null; Pcls.MsgReceivedDate = reader["MsgReceivedDate"] != DBNull.Value ? (reader.GetDateTime(reader.GetOrdinal("MsgReceivedDate"))).ToString() : null; Pcls.ProfilePhotoName = reader["ProfilePhotoName"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("ProfilePhotoName")) : null; Pcls.IsReviewed = reader["IsReviewed"] != DBNull.Value ? reader.GetBoolean(reader.GetOrdinal("IsReviewed")) : bnull; Pcls.IsActive = reader["IsActive"] != DBNull.Value ? reader.GetBoolean(reader.GetOrdinal("IsActive")) : bnull; Pcls.ProfileBattery = reader["ProfileBattery"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("ProfileBattery")) : inull; Pcls.EmpID = reader["EmpID"] != DBNull.Value ? reader.GetInt64(reader.GetOrdinal("EmpID")) : Lnull; Pcls.EmpPhone = reader["EmpPhone"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("EmpPhone")) : null; Pcls.OfficialContactNumber = reader["OfficialContactNumber"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("OfficialContactNumber")) : null; Pcls.EmployeeName = reader["EmployeeName"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("EmployeeName")) : null; Pcls.EmailID = reader["EmailID"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("EmailID")) : null; Pcls.PhotoViewCount = reader["PhotoViewCount"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("PhotoViewCount")) : inull; Pcls.PartnetPrefernceLastOnemonth = reader["PartnetPrefernceLastOnemonth"] != DBNull.Value ? reader.GetInt32(reader.GetOrdinal("PartnetPrefernceLastOnemonth")) : inull; Pcls.Photo = reader["Photo"] != DBNull.Value ? reader.GetString(reader.GetOrdinal("Photo")) : null; Pcls.MaskDiv = (!string.IsNullOrEmpty(Pcls.ProfilePhotoName) && (Pcls.IsReviewed == true && Pcls.IsActive == true)) ? " " : ((!string.IsNullOrEmpty(Pcls.ProfilePhotoName) && (Pcls.IsReviewed == true || Pcls.IsActive == true)) ? "divCSSclass clearfix" : "cssMaskupload clearfix"); land.PersonalInfo = Pcls; } } reader.NextResult(); if (reader.HasRows) { while (reader.Read()) { PartnerProfilesLatest Partnercls = ReturnPartnerProfilesClass(reader, "Partner"); PartnerLi.Add(Partnercls); } land.PartnerProfilesnew = PartnerLi; } reader.Close(); } } catch (Exception ex) { Commonclass.ApplicationErrorLog(spName, Convert.ToString(ex.Message), CustID, null, null); } finally { con.Close(); //SqlConnection.ClearPool(con); //SqlConnection.ClearAllPools(); } return(land); }