protected void LB_Next_Click(object sender, EventArgs e) { HttpCookieCollection objHttpCookieCollection = Request.Cookies; HttpCookie objHttpCookie = objHttpCookieCollection.Get("MatCookie5639sb"); string strMatrimonialID = Crypto.DeCrypto(objHttpCookie.Values["MatrimonialID"]); //Previous Enabled LB_Previous_1.Enabled = true; LB_Previous_2.Enabled = true; //Getting values int intStart = int.Parse(HF_Start.Value); int intCount = int.Parse(HF_Count.Value); int intCurrent; intCurrent = intCount - (intStart + 10); //Update Start Pointer intStart += 10; HF_Start.Value = (intStart).ToString(); if (intCurrent < 10) { LB_Next_1.Enabled = false; LB_Next_2.Enabled = false; L_Current_1.Text = (intStart + intCurrent).ToString(); L_Current_2.Text = (intStart + intCurrent).ToString(); } else { L_Current_1.Text = (intStart + 10).ToString(); L_Current_2.Text = (intStart + 10).ToString(); } //Getting SSList if (HF_In_Out.Value == "1") { LoadList(InternalMessage.MailType.OutBox, MatrimonialMessanger.GetMessageList(intStart, strMatrimonialID, true), intStart, strMatrimonialID); } else { LoadList(InternalMessage.MailType.Inbox, MatrimonialMessanger.GetMessageList(intStart, strMatrimonialID, false), intStart, strMatrimonialID); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Adding meta Discription HtmlMeta objMeta = new HtmlMeta(); objMeta.Name = "Description"; objMeta.Content = WebConfig.GetValues("MetaDiscription"); this.Header.Controls.Add(objMeta); // Adding meta KeyWords objMeta = new HtmlMeta(); objMeta.Name = "keywords"; objMeta.Content = WebConfig.GetValues("MetaKeword"); this.Header.Controls.Add(objMeta); HttpCookieCollection objHttpCookieCollection = Request.Cookies; HttpCookie objHttpCookie = objHttpCookieCollection.Get("MatCookie5639sb"); string strMatrimonialID = Crypto.DeCrypto(objHttpCookie.Values["MatrimonialID"]); int intCount = 0; if (Request.QueryString["id"] == "2") { intCount = MatrimonialMessanger.GetMessageCount(strMatrimonialID, true); HF_In_Out.Value = "1"; } else { intCount = MatrimonialMessanger.GetMessageCount(strMatrimonialID, false); HF_In_Out.Value = "0"; } //Setting Count L_Last_2.Text = intCount.ToString(); L_Last_1.Text = intCount.ToString(); if (intCount > 0) { IB_Delete_1.Visible = true; IB_Delete_2.Visible = true; if (intCount < 10) { LB_Next_1.Enabled = false; LB_Next_2.Enabled = false; L_Current_1.Text = intCount.ToString(); L_Current_2.Text = intCount.ToString(); } else { LB_Next_1.Enabled = true; LB_Next_2.Enabled = true; L_Current_1.Text = "10"; L_Current_2.Text = "10"; } HF_Start.Value = "0"; HF_Count.Value = (intCount).ToString(); if (Request.QueryString["id"] == "2") { LoadList(InternalMessage.MailType.OutBox, MatrimonialMessanger.GetMessageList(0, strMatrimonialID, true), 0, strMatrimonialID); } else { LoadList(InternalMessage.MailType.Inbox, MatrimonialMessanger.GetMessageList(0, strMatrimonialID, false), 0, strMatrimonialID); } } else { L_Current_1.Text = "0"; L_Current_2.Text = "0"; } } }