public void GenderBind() { dl_RTI_Request objDL = new dl_RTI_Request(); ReturnClass.ReturnDataTable dt = objDL.GetDDL_data("Gender"); DDL_Gender.DataSource = dt.table; DDL_Gender.DataTextField = "DisplayName_en"; DDL_Gender.DataValueField = "DDL_Name_Value"; DDL_Gender.DataBind(); }
public void UserTypeBind() { dl_RTI_Request objDL = new dl_RTI_Request(); ReturnClass.ReturnDataTable dt = objDL.GetDDL_data("UserType"); ddl_usertype.DataSource = dt.table; ddl_usertype.DataTextField = "DisplayName_en"; ddl_usertype.DataValueField = "DDL_Name_Value"; ddl_usertype.DataBind(); ddl_usertype.Items.Insert(0, new ListItem("--Select User Type--", "0")); }
public void OfficeCategoryBind() { dl_RTI_Request objDL = new dl_RTI_Request(); //string dept = DDL_Department.SelectedItem.Value; ReturnClass.ReturnDataTable dt = objDL.Get_RTI_DDL_Data("SELECT OfficeCategoryCode, OfficeCategoryName FROM officeCategory order by OfficeCategoryName "); DDL_OfficeCategory.DataSource = dt.table; DDL_OfficeCategory.DataTextField = "OfficeCategoryName"; DDL_OfficeCategory.DataValueField = "OfficeCategoryCode"; DDL_OfficeCategory.DataBind(); DDL_OfficeCategory.Items.Insert(0, new ListItem("--Select Office Category--", "0")); }
public void BaseDepartmentBind() { dl_RTI_Request objDL = new dl_RTI_Request(); //string dept = DDL_Department.SelectedItem.Value; ReturnClass.ReturnDataTable dt = objDL.Get_RTI_DDL_Data("SELECT dept_id, dept_name FROM basedepartment order by dept_name "); DDL_BaseDepartment.DataSource = dt.table; DDL_BaseDepartment.DataTextField = "dept_name"; DDL_BaseDepartment.DataValueField = "dept_id"; DDL_BaseDepartment.DataBind(); DDL_BaseDepartment.Items.Insert(0, new ListItem("--Select Department--", "0")); }
public void DistrictBind() { dl_RTI_Request objDL = new dl_RTI_Request(); //string dept = DDL_Department.SelectedItem.Value; ReturnClass.ReturnDataTable dt = objDL.Get_RTI_DDL_Data("SELECT District_ID, District_Name FROM districts WHERE StateCode='22' order by District_Name "); RTI_DDL_District.DataSource = dt.table; RTI_DDL_District.DataTextField = "District_Name"; RTI_DDL_District.DataValueField = "District_ID"; RTI_DDL_District.DataBind(); RTI_DDL_District.Items.Insert(0, new ListItem("--Select District--", "0")); }
public void OfficeLevelBind() { dl_RTI_Request objDL = new dl_RTI_Request(); string dept = DDL_BaseDepartment.SelectedItem.Value; string strquery = "SELECT OfficeLevelCode, OfficeLevelName FROM officelevel WHERE " + " officelevel.BaseDeptCode='" + dept + "' order by OfficeLevelName "; ReturnClass.ReturnDataTable dt = objDL.Get_RTI_DDL_Data(strquery); DDL_OfficeLevel.DataSource = dt.table; DDL_OfficeLevel.DataTextField = "OfficeLevelName"; DDL_OfficeLevel.DataValueField = "OfficeLevelCode"; DDL_OfficeLevel.DataBind(); DDL_OfficeLevel.Items.Insert(0, new ListItem("--Select Office Level--", "0")); }
public void bind_state() { bl_RTI_Request objblData = new bl_RTI_Request(); dl_RTI_Request objData = new dl_RTI_Request(); ReturnClass.ReturnDataTable rd = new ReturnClass.ReturnDataTable(); DDL_State.Items.Clear(); objblData.Country = ddl_country.SelectedValue; rd = objData.BindState(objblData); DDL_State.DataSource = rd.table; DDL_State.DataTextField = "state_name_e"; DDL_State.DataValueField = "state_id"; DDL_State.DataBind(); DDL_State.Items.Add(new ListItem(" Choose State", "0")); }
public void bind_district() // user district { bl_RTI_Request bl = new bl_RTI_Request(); dl_RTI_Request dl = new dl_RTI_Request(); ReturnClass.ReturnDataTable rd = new ReturnClass.ReturnDataTable(); ddl_district.Items.Clear(); bl.State = DDL_State.SelectedValue; rd = dl.BindDistrict(bl); ddl_district.DataSource = rd.table; ddl_district.DataTextField = "District_Name"; ddl_district.DataValueField = "District_ID"; ddl_district.DataBind(); ddl_district.Items.Add(new ListItem("Choose District", "0")); }
public void ShowUserData() { bl_RTI_Request objblData = new bl_RTI_Request(); objblData.RTI_login_userName = userID; dl_RTI_Request objData = new dl_RTI_Request(); ReturnClass.ReturnDataTable dt = objData.GetUserData(objblData); if (dt.status) { ddl_country.SelectedValue = objblData.Country; bind_state(); DDL_State.SelectedValue = objblData.State; bind_district(); txtName.Text = objblData.NameEnglish; txtEmailID.Text = objblData.Email; txtAddress.Text = objblData.Address; txtPinCode.Text = objblData.Pincode; ddl_usertype.SelectedIndex = ddl_usertype.Items.IndexOf(ddl_usertype.Items.FindByValue(objblData.UserType)); txtMobile.Text = objblData.Mobile; H_LoginMobileNo.Value = objblData.Mobile; // Keep user login mobile no. DDL_Gender.SelectedIndex = DDL_Gender.Items.IndexOf(DDL_Gender.Items.FindByValue(objblData.Gender)); ddl_country.SelectedIndex = ddl_country.Items.IndexOf(ddl_country.Items.FindByValue(objblData.Country)); if (objblData.Country == "999") { txtOther.Visible = true; lbl_state.Text = "Country Name"; //rfv_state.Enabled = true; RFV_State.Enabled = false; rfv_district.Enabled = false; REV_PinCode.Enabled = false; //lbl_district.Visible = false; ctc.Visible = false; ddl_district.Visible = false; DDL_State.Visible = false; ddlState.Visible = false; // txtState_Other.Text = ""; txtState_Other.Text = objblData.CountryName; } else { DDL_State.SelectedIndex = DDL_State.Items.IndexOf(DDL_State.Items.FindByValue(objblData.State)); ddl_district.SelectedIndex = ddl_district.Items.IndexOf(ddl_district.Items.FindByValue(objblData.District)); } } // End of If }
public void OfficeBind() { dl_RTI_Request objDL = new dl_RTI_Request(); string dept = DDL_BaseDepartment.SelectedItem.Value; string district = RTI_DDL_District.SelectedItem.Value; string officeCategory = DDL_OfficeCategory.SelectedItem.Value; string officeLevel = DDL_OfficeLevel.SelectedItem.Value; string strquery = "SELECT NewOfficeCode, OfficeName FROM office WHERE " + " office.BaseDeptCode='" + dept + "' AND office.DistrictCodeNew='" + district + "'" + " AND office.OfficeCategory='" + officeCategory + "' AND office.OfficeLevel='" + officeLevel + "' order by OfficeName "; ReturnClass.ReturnDataTable dt = objDL.Get_RTI_DDL_Data(strquery); DDL_Office.DataSource = dt.table; DDL_Office.DataTextField = "OfficeName"; DDL_Office.DataValueField = "NewOfficeCode"; DDL_Office.DataBind(); DDL_Office.Items.Insert(0, new ListItem("--Select Office--", "0")); }
public void BindOfficer() { bl_RTI_Request objblData = new bl_RTI_Request(); dl_RTI_Request objData = new dl_RTI_Request(); ReturnClass.ReturnDataTable rd = new ReturnClass.ReturnDataTable(); //DDL_RTI_Officer.Items.Clear(); objblData.Base_department_id = DDL_BaseDepartment.SelectedValue; objblData.District_id_ofc = RTI_DDL_District.SelectedValue; objblData.Office_category = DDL_OfficeCategory.SelectedValue; objblData.Office_level_id = DDL_OfficeLevel.SelectedValue; objblData.Office_id = DDL_Office.SelectedValue; rd = objData.BindOfficerDL(objblData); DDL_RTI_Officer.DataSource = rd.table; DDL_RTI_Officer.DataTextField = "Name_en"; DDL_RTI_Officer.DataValueField = "office_mapping_id"; DDL_RTI_Officer.DataBind(); // DDL_RTI_Officer.Items.Add(new ListItem(" select officer", "0")); DDL_RTI_Officer.Items.Insert(0, new ListItem("--Select Officer--", "0")); }
protected void btn_Submit_Click1(object sender, EventArgs e) { if (Page.IsValid) { if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString()) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); bool cptch_expired = false; try { Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim()); } catch { cptch_expired = true; } txtCaptcha.Text = ""; if (!cptch_expired) { if (Captcha1.UserValidated) { Captcha1.DataBind(); dl_RTI_Registration dl = new dl_RTI_Registration(); bl_RTI_Request objBL = new bl_RTI_Request(); dl_RTI_Request objDl = new dl_RTI_Request(); // set data for rti_request objBL.RTI_Request_id = objDl.Get_unique_RtiRequest_code(); //"<NTC>RTI Request ID from DL";//objDl.GetMaxValue("SELECT IFNULL(MAX(rti_request_id),0) as NO FROM rti_detail "); objBL.UserType = ddl_usertype.SelectedItem.Value; objBL.NameEnglish = txtName.Text; objBL.Gender = DDL_Gender.SelectedItem.Value; objBL.Email = txtEmailID.Text; objBL.Address = txtAddress.Text; objBL.Country = ddl_country.SelectedItem.Value; objBL.Securitycode = dl.GenOTPString(4); HttpBrowserCapabilities browse = Request.Browser; objBL.UserAgent = Request.UserAgent.ToString(); objBL.Client_os = Utilities.System_Info(this.Page); objBL.ClientBrowser = browse.Browser; objBL.IsRTIFileUpload = "N"; objBL.IsNew = "Y"; if (objBL.Country == "091") { objBL.State = DDL_State.SelectedItem.Value; objBL.District = ddl_district.SelectedItem.Value; objBL.CountryName = null; } else { objBL.CountryName = txtState_Other.Text; } objBL.Pincode = txtPinCode.Text; objBL.Mobile = txtMobile.Text; objBL.Rti_Subject = txt_subject.Text; objBL.RTI_Text = txt_RequestApplicationText.Text; objBL.RTI_login_userName = userID; //objBL.RTI_request_date = DateTime.Now.ToString("yyyy-MM-dd"); Utilities util = new Utilities(); objBL.RTI_ipaddress = util.GetClientIpAddress(this.Page);//GetIPAddress(); objBL.RTI_Is_bpl = DDL_BPL.SelectedItem.Value; # region check for BPL if (objBL.RTI_Is_bpl == "Y") { if (FU_BPL.PostedFile == null || FU_BPL.PostedFile.ContentLength < 1) { Utilities.MessageBox_UpdatePanel(update1, "Attach one BPL Supporting Document "); return; } objBL.BPL_Card_No = txtBPLNo.Text; int Current_year = Convert.ToInt32(DateTime.Now.Year); int find_year = Convert.ToInt32(txtYearOfIssue.Text); if (find_year > Current_year) { // Utilities.MessageBoxShow("Year should not be greater then current year"); Utilities.MessageBox_UpdatePanel(update1, "Year should not be greater then current year "); return; } else { objBL.BPL_Issue_Year = txtYearOfIssue.Text; } objBL.BPL_Issuing_Authority = txtIssuingAuthority.Text; //objBL.RTI_Fees = "0"; } else { //objBL.RTI_Fees = "10"; } #endregion BPL // set data for rti_filed_user // objBL.RTI_filed_user_id = objDl.GetMaxValueRtiFiledUser();//"<NTC>RTI Filed user ID from DL"; //objDl.GetMaxValue("SELECT IFNULL(MAX(rti_FiledUserID),0) as NO FROM rti_filed_user "); # region file submit problem is generating here objBL.RTI_filed_user_id = objBL.RTI_Request_id; objBL.Rti_Status = "REG"; //Initial status of RTI Filed objBL.Action_id = ""; objBL.IsValid = "N"; objBL.Office_mapping_id = DDL_RTI_Officer.SelectedValue; objBL.Action_date = DateTime.Now.ToString("yyyy-MM-dd"); // Need to ask //objBL.Rti_Status = "registered"; // initial status //set data for rti_file string RTI_fileID = objDl.GetMaxValueRtiFiles();// "<NTC> file iD";//objDl.GetMaxValue("SELECT IFNULL(MAX(rti_fileID),0) as NO FROM rti_files "); List <bl_RTI_RequestFiles> objList = new List <bl_RTI_RequestFiles>(); int maxCountFileID = Convert.ToInt32(RTI_fileID); if (FU_BPL.PostedFile != null && FU_BPL.PostedFile.FileName != "") { if (FU_BPL.PostedFile.ContentLength > 0) { bl_RTI_RequestFiles objBLFile = new bl_RTI_RequestFiles(); HttpPostedFile postedFile = FU_BPL.PostedFile; objBLFile.FileDescription = txt_FU_BPL_Disc.Text; objBLFile.RTI_fileID = maxCountFileID.ToString(); objBLFile.RTI_fileName = Path.GetFileName(postedFile.FileName); objBLFile.RTI_fileType = postedFile.ContentType; objBLFile.BPL_RTI_FileType = "BPL_DOC"; // it is a BPL Supporting Document objBLFile.RTI_Request_id = objBL.RTI_Request_id; Stream fs = postedFile.InputStream; if ((objBLFile.RTI_fileType == "application/pdf" || objBLFile.RTI_fileType == "application/x-pdf" || objBLFile.RTI_fileType == "application/x-unknown") && fs.Length < 2097152) { BinaryReader br = new BinaryReader(fs); byte[] bytes = br.ReadBytes((Int32)fs.Length); objBLFile.RTI_fileData = bytes; maxCountFileID = maxCountFileID + 1; objList.Add(objBLFile); // Add into the list } else { //statusCount = 1; // Utilities.MessageBoxShow("Only Image File and less then 1000 KB is accepted"); //lbl_status.Text = " Only Image File and less then 1000 KB is accepted "; Utilities.MessageBox_UpdatePanel(update1, " Only PDF File and less then 2000 KB is accepted for BPL File"); return; } } else { Utilities.MessageBox_UpdatePanel(update1, " BPL File Size Must be great then Zero"); return; } } // RTI File Insert in data base if (FU_RTI.PostedFile != null && FU_RTI.PostedFile.FileName != "") { if (FU_RTI.PostedFile.ContentLength > 0) { bl_RTI_RequestFiles objBLFile = new bl_RTI_RequestFiles(); HttpPostedFile postedFile = FU_RTI.PostedFile; objBLFile.FileDescription = txt_FU_RTI_Disc.Text; objBLFile.RTI_fileID = maxCountFileID.ToString(); objBLFile.RTI_fileName = Path.GetFileName(postedFile.FileName); objBLFile.RTI_fileType = postedFile.ContentType; objBLFile.BPL_RTI_FileType = "RTI_DOC"; // it is RTI Document objBLFile.RTI_Request_id = objBL.RTI_Request_id; Stream fs = postedFile.InputStream; if ((objBLFile.RTI_fileType == "application/pdf" || objBLFile.RTI_fileType == "application/x-pdf" || objBLFile.RTI_fileType == "application/x-unknown") && fs.Length < 2097152) { BinaryReader br = new BinaryReader(fs); byte[] bytes = br.ReadBytes((Int32)fs.Length); objBLFile.RTI_fileData = bytes; maxCountFileID = maxCountFileID + 1; objList.Add(objBLFile); // Add into the list } else { //statusCount = 1; // Utilities.MessageBoxShow("Only Image File and less then 1000 KB is accepted"); //lbl_status.Text = " Only Image File and less then 1000 KB is accepted "; Utilities.MessageBox_UpdatePanel(update1, " Only PDF File and less then 2000 KB is accepted for RTI File"); return; } } else { Utilities.MessageBox_UpdatePanel(update1, "RTI File Size Must be greater then Zero"); return; } objBL.IsRTIFileUpload = "Y"; } #endregion if (objBL.Mobile == H_LoginMobileNo.Value) { objBL.IsValid = "Y"; } ReturnClass.ReturnBool dt = objDl.Insert_RTI_Info(objBL, objList); if (dt.status == true) { if (objBL.Mobile == H_LoginMobileNo.Value) { // Directly go to success page No Need OTP string rti_message = "RTI Submition successfull your Registration no. is: " + objBL.RTI_Request_id + " And Your Security Code is: " + objBL.Securitycode + " please save details for further Information."; Utilities.MessageBox_UpdatePanel_Redirect(update1, rti_message, "./UserWelcome.aspx"); } else { Session["RTI_ID"] = objBL.RTI_Request_id; Session["VERIFICATION_TYPE"] = "Rti"; Utilities.MessageBox_UpdatePanel_Redirect(update1, "Your RTI Request has been submited Need Mobile Verification for Registeration", "./User_Mobile_Varification.aspx"); } } else { Utilities.MessageBox_UpdatePanel(update1, "RTI Submition Failed"); } }//end of captcha1 validated else { Utilities.MessageBox_UpdatePanel(update1, "Incorrect Security Code"); } } // If ! captch expired } // End of If checkRefresh
}// Button2_click End protected void btn_close_Click(object sender, EventArgs e) { string otp_sc = null; if (Session["OTP_SC"] != null) { otp_sc = Session["OTP_SC"].ToString(); } string rti_id = Session["RTI_ID"].ToString(); string payment, due; ReturnClass.ReturnDataTable dtt = new ReturnClass.ReturnDataTable(); bl_RTI_Request blrti = new bl_RTI_Request(); dl_RTI_Request dlrti = new dl_RTI_Request(); ReturnClass.ReturnBool rtbool = new ReturnClass.ReturnBool(); try { bl.RTI_provisional_no = Session["RTI_ID"].ToString(); blrti.RTI_Request_id = bl.RTI_provisional_no; blrti.IsPaymentMade = "Y"; dt = dl.getrecord(bl); if (dt.table.Rows.Count > 0) { dtt = dl.getamount(bl); if (dtt.table.Rows.Count > 0) { payment = dtt.table.Rows[0]["Fees"].ToString(); if (Convert.ToInt32(payment) >= (Convert.ToInt32(amounttobepaid))) { // Update payment status rtbool = dlrti.update_Rti_Payment_status(blrti); if (rtbool.status == true) { if (otp_sc != null) { // Directly go to success page No Need OTP string rti_message = ""; if (Session["language"].ToString() == "en-GB") { rti_message = "RTI Submission successfull your Registration no. is: " + rti_id + " And Your Security Code is: " + otp_sc + " please save details for further Information."; } else { rti_message = "आपका आर. टी. आई. सफलता पूर्वक सबमिट हो गया, आपका रजिस्ट्रेशन न. है " + rti_id + " और सुरक्षा कोड है " + otp_sc + "कृपया विवरण को उपयोग के लिए सुरक्षित रखें|"; } // string rti_message = "RTI Submition successfull your Registration no. is: " + rti_id + " And Your Security Code is: " + otp_sc + " please save details for further Information."; Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel3, rti_message, "../user/UserWelcome.aspx"); } else { if (Session["language"].ToString() == "en-GB") { Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel3, "Your RTI Request has been submited Need Mobile Verification for Registeration", "../user/User_Mobile_Varification.aspx"); } else { Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel3, "आपका आर. टी. आई. सबमिट हो गया, आपको रजिस्ट्रेशन के लिए मोबाईल वेरिफिकेसन की जरुरत है| ", "../user/User_Mobile_Varification.aspx"); } //Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel3, "Your RTI Request has been submited Need Mobile Verification for Registeration", "../user/User_Mobile_Varification.aspx"); } } else { if (Session["language"].ToString() == "en-GB") { Utilities.MessageBox_UpdatePanel(UpdatePanel3, "Failed to update Payment status ! Try again"); } else { Utilities.MessageBox_UpdatePanel(UpdatePanel3, "भुगतान की स्थिति अपडेट करने में विफल ! पुनः प्रयास करें"); } // Utilities.MessageBox_UpdatePanel(UpdatePanel3, "Failed to update Payment status ! Try again"); } } else { due = ((Convert.ToInt32(amounttobepaid)) - (Convert.ToInt32(payment))).ToString(); if (((Convert.ToInt32(amounttobepaid)) - (Convert.ToInt32(payment))) >= 0) { if (Session["language"].ToString() == "en-GB") { Utilities.MessageBox_UpdatePanel(UpdatePanel3, "Please Pay Due Amount Rs. " + due + " By e-challan than Proceed."); } else { Utilities.MessageBox_UpdatePanel(UpdatePanel3, "कृपया देय राशि का भुगतान करें रु. " + due + " ई-चालान के द्वारा फिर आगे बढ़ें|"); } // Utilities.MessageBox_UpdatePanel(UpdatePanel3, "Please Pay Due Amount " + due + " By e-challan than Proceed"); } } } } else { Button2.Visible = true; if (Session["language"].ToString() == "en-GB") { Utilities.MessageBox_UpdatePanel(UpdatePanel3, "Please Pay Due Amount Rs. " + amounttobepaid + " By e-challan than Proceed."); } else { Utilities.MessageBox_UpdatePanel(UpdatePanel3, "कृपया देय राशि का भुगतान करें रु. " + amounttobepaid + " ई-चालान के द्वारा फिर आगे बढ़ें|"); } // Utilities.MessageBox_UpdatePanel(UpdatePanel3, "Please Pay Due Amount " + amounttobepaid + " By e-challan than Proceed"); } } catch (NullReferenceException) { if (Session["language"].ToString() == "en-GB") { Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel3, "Your Session is Expired...Please login Again ", "../Logout.aspx"); } else { Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel3, "आपका सत्र समाप्त हो गया है...कृपया फिर से लॉग इन करें ", "../Logout.aspx"); } // Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel3, "Your Session is Expire...Please login Again ", "../Logout.aspx"); } } // End of btn_close_Click