public string CheckLoginInfo(string login_id, string login_password) { string strvalue = string.Empty; try { string[] arr = { "@login_id" }; string[] arrvalue = { login_id.Trim() }; DAL_Class dal = new DAL_Class(); DataTable dt = dal.FillDataTable("rms_login", arr, arrvalue); if (dt.Rows.Count > 0) { if (dt.Rows[0]["team_password"].ToString() == login_password) { Session["LoginId"] = dt.Rows[0]["team_email"].ToString(); Session["Username"] = dt.Rows[0]["team_name"].ToString(); } else { strvalue = "Invalid Password"; } } else { strvalue = "Invalid Email Id"; } } catch (Exception) { strvalue = "Invalid EmailId/Password"; } return(strvalue); }
public string SaveRegistrationDetails(string team_name, string team_email, string team_phone, string team_phonecode, string team_password, string team_leader, string team_address, string team_university) { string strvalue = string.Empty; try { string[] arr = { "@team_name", "@team_email", "@team_phone", "@team_phonecode", "@team_password", "@team_leader", "@team_address", "@team_university" }; string[] arrvalue = { team_name.Trim(), team_email.Trim(), team_phone.Trim(), team_phonecode.Trim(), team_password.Trim(), team_leader.Trim(), team_address.Trim(), team_university.Trim() }; DAL_Class dal = new DAL_Class(); DataTable dt = dal.FillDataTable("rms_RegistrationInfo", arr, arrvalue); if (dt.Rows.Count > 0) { if (dt.Rows[0][0].ToString() == "1") { strvalue = "Registration done successfully"; string body = "Dear " + team_leader + ",<br/><br/> You has been successfully registered.Your Account login credentials details are <<br/><b>Username : </b>" + team_email + "<br /><b>Password : </b>" + team_password + "<br /> <br/><br/>Thanks and Regards<br/>Administrator."; dal.sendMail(team_email, body, "Thankyou for registration", Server.MapPath("~/Uploads/Files/somaa_workshop.pdf")); } else { strvalue = "Email Id already exist"; } } } catch (Exception) { } return(strvalue); }
public string SaveContactDetails(string fullname, string emailid, string subject, string question, string address, string phone) { string strvalue = string.Empty; try { string[] arr = { "@FullName", "@EmailId", "@Subjects", "@Questions", "@address", "@phone" }; string[] arrvalue = { fullname.Trim(), emailid.Trim(), subject.Trim(), question.Trim(), address.Trim(), phone.Trim() }; DAL_Class dal = new DAL_Class(); DataTable dt = dal.FillDataTable("rms_ContactInfo", arr, arrvalue); StringBuilder sb = new StringBuilder(); sb.Append("<h3>Contact Enquiry</h3><table><tr><td>Name</td><td>" + fullname + "</td></tr>"); sb.Append("<tr><td>Email Id</td><td>" + emailid + "</td></tr>"); sb.Append("<tr><td>Subject</td><td></td>" + subject + "</tr>"); sb.Append("<tr><td>Question</td><td></td>" + question + "</tr>"); sb.Append("<tr><td>Address</td><td></td>" + address + "</tr>"); sb.Append("<tr><td>Phone</td><td></td>" + phone + "</tr>"); sb.Append("</table>"); dal.sendMail("[email protected],[email protected]", sb.ToString(), "Contact Detail : SomaaIndia.com", Server.MapPath("~/Uploads/Files/1473410180.pdf")); if (dt.Rows.Count > 0) { strvalue = "Information submit successfully"; } } catch (Exception) { } return(strvalue); }
public string GetPasswordDetails(string team_email) { string strvalue = string.Empty; try { string[] arr = { "@login_id" }; string[] arrvalue = { team_email.Trim() }; DAL_Class dal = new DAL_Class(); DataTable dt = dal.FillDataTable("rms_login", arr, arrvalue); if (dt.Rows.Count > 0) { //if (dt.Rows[0][0].ToString() == "1") //{ strvalue = "Please check your mail to get password"; string body = "Dear " + dt.Rows[0]["team_leader"].ToString() + ",<br/><br/> Your password for login is </b>" + dt.Rows[0]["team_password"].ToString() + "<br /> <br/><br/>Thanks and Regards<br/>Administrator."; dal.sendMail(team_email, body, "Get Password", ""); //} } else { strvalue = "Invalid Email Id"; } } catch (Exception) { } return(strvalue); }
protected void btnsend_Click(object sender, EventArgs e) { if (ctrlGoogleReCaptcha.Validate()) { if (txtname.Value.Trim() == string.Empty || txtmobile.Value.Trim() == string.Empty || txtmessage.Value.Trim() == string.Empty || txtemail.Value.Trim() == string.Empty || txtdob.Value.Trim() == string.Empty) { return; } else { DAL_Class dal = new DAL_Class(); StringBuilder sb = new StringBuilder(); sb.Append("<h3>Career Form Detail </h3><table style='border: 1px solid #ddd;width: 100%;max-width: 100%;margin-bottom: 20px;border-spacing: 0;border-collapse: collapse;'><tbody style='display: table-row-group;vertical-align: middle;border-color: inherit;'>"); sb.Append("<tr><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>Name</td><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>" + txtname.Value + "</td></tr>"); sb.Append("<tr><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>Email Id</td><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>" + txtemail.Value + "</td></tr>"); sb.Append("<tr><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>Mobile</td><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>" + txtmobile.Value + "</td></tr>"); sb.Append("<tr><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>DOB</td><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>" + txtdob.Value + "</td></tr>"); sb.Append("<tr><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>Message</td><td style='font-size:14px;border: 1px solid #ddd;width:5%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>" + txtmessage.Value + "</td></tr>"); sb.Append("</tbody></table>"); if (dal.sendMail("[email protected], [email protected]", "*****@*****.**", sb.ToString(), "Career Form : SIIinfotech.com", (FileUpload1.HasFile ? FileUpload1.FileContent : null), (FileUpload1.HasFile ? System.IO.Path.GetFileName(FileUpload1.FileName) : string.Empty), null)) { System.Web.UI.ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AlertBox", "alert('Form Submitted successfully!');", true); reset(); } } } else { //captcha challenge failed Label1.Text = "Captcha Failed!! Please try again!!"; reset(); } }
//Trainee public string AddTrainee(Trainee trainee) { try { //Tester id validation if (DAL_Class.IsIdFormatValid(trainee.Id) == false) { throw new Exception(trainee.GetName() + "'s Id " + trainee.Id + " is not valid"); } else if (DAL_Class.IsTraineeIdFound(trainee.Id) == true) { throw new Exception(trainee.GetName() + "'s Id " + trainee.Id + " is already found"); } else { DataSource.TraineesList.Add(trainee); SaveTraineesList(DataSource.TraineesList); return(null); } } catch (Exception e) { return(e.Message); } }
//Permissons public List <Permisson> GetAllPermissions() { LoadPermissionsFile(); List <Permisson> permissionsList = new List <Permisson>(); try { permissionsList = (from permission in permissionsRoot.Elements() select new Permisson() { AccessLevel = Utilities.ConvertStringToAccessLevelEnum(permission.Element("AccessLevel").Value), Id = permission.Element("Id").Value, Password = permission.Element("Password").Value }).ToList(); } catch (Exception e) { MessageBox.Show(e.ToString()); } DataSource.PermissionsList = permissionsList; return(DAL_Class.GetClonedList(DataSource.PermissionsList)); }
protected void btnsend_Click(object sender, EventArgs e) { try { //Lead Entry if (txtname.Text == string.Empty) { return; } DAL_Class dal = new DAL_Class(); StringBuilder stringBuilder1 = new StringBuilder(); stringBuilder1.Append(string.Concat(new string[] { "<p style='font-family: Helvetica, Arial, sans-serif;font-size:14px;line-height: 1.5;color: #222;padding: 0'>Dear ", this.txtname.Text.Trim(), ",</p>", "<h1 style='font-family: Helvetica, Arial, sans-serif;line-height: 1.5;color: #000;padding: 0'>Thank you for your believe in KanGoKiwi!</p><br/>", "<h4 style='font-family: Helvetica, Arial, sans-serif;line-height: 1.5;color: #222;padding: 0'>Your message has been sent successfully.</h4>", "<p style='font-size:14px;font-family: Helvetica, Arial, sans-serif;line-height: 1.5;color: #222;padding: 0'>One of our expert counsellor will get in touch with you, at earliest.</p>", "<br/><p style='font-size:14px;font-family: Helvetica, Arial, sans-serif;line-height: 1.5;color: #222;padding: 0'>Regards,</p><br/>", "<img src='http://akhilsharma.co/assets/image/kangokiwi-study-abroad-consultant-logo2.png' />", "<h3>KanGoKiwi STUDY ABROAD CONSULTANT</h3>", "<p style='font-size:14px;font-family: Helvetica, Arial, sans-serif;line-height: .5;color: #222;padding: 0'>Phone: <a href='tel:+918860123444'>+91 8860123444</a></p>", "<p style='font-size:14px;font-family: Helvetica, Arial, sans-serif;line-height: .5;color: #222;padding: 0'>Address: Basement, Bhagwan Sahay Complex, Naya Bans, Sector 15, Noida - 201301</p>", "<p style='font-size:14px;font-family: Helvetica, Arial, sans-serif;line-height: .5;color: #222;padding: 0'>Website: <a href='http://kangokiwi.in'>www.kangokiwi.in</a></p>", "<p style='font-size:14px;font-family: Helvetica, Arial, sans-serif;line-height: .5;color: #222;padding: 0'>Email: <a href='mailto:[email protected]' target='_blank'>[email protected]</a></p>" })); dal.sendMail(this.txtemailid.Text.Trim(), "*****@*****.**", stringBuilder1.ToString(), "KanGokiwi Noida : Test Prep | Study Abroad Consultant", null, null, null); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(string.Concat(new string[] { "<h3 style='text-align: center'>Enquiry from Google Campaign : www.kangokiwi.in</h3><table style='border: 1px solid #ddd;width: 100%;max-width: 100%;margin-bottom: 20px;border-spacing: 0;border-collapse: collapse;'><tbody style='display: table-row-group;vertical-align: middle;border-color: inherit;'><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Name </b>:</td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", this.txtname.Text.Trim(), "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Email ID</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", this.txtemailid.Text.Trim(), "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Mobile Number</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", this.txtphone.Text.Trim(), "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Degree</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", RadioButtonList1.SelectedValue, "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Country</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", ddlcountry.SelectedValue, "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Course</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", RadioButtonList2.SelectedValue, "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>IP Address</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", this.GetIPAddress() })); stringBuilder.Append("</td></tr></tbody></table><br/><br/></br>"); dal.sendMail("[email protected], [email protected]", "*****@*****.**", stringBuilder.ToString(), "Online Enquiry Form", null, null, null); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Form Submitted successfully');", true); } catch (Exception ex) { ex.ToString(); //ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Code in Catch!');", true); // this.sendMail("*****@*****.**", "Mail from Kangokiwi enquiry", ex.Message.ToString() + ";" + this.txtname.Text.Trim() + "," + this.txtemailid.Text.Trim() + "," + this.txtphone.Text.Trim() + "," + this.txtmessage.Text.Trim(), "Enquiry From Cloud based School Management ERP", "", null); } this.reset(); Response.Redirect("http://www.kangokiwi.com/ielts-coaching-noida/"); }
public List <DistanceStruct> GetAllDistances() { LoadDistancesFile(); List <DistanceStruct> distancesList = new List <DistanceStruct>(); try { distancesList = (from distance in distancesRoot.Elements() select new DistanceStruct() { OriginAddress = Utilities.ConvertStringToAddressStruct(distance.Element("OriginAddress").Value), DestinationAddress = Utilities.ConvertStringToAddressStruct(distance.Element("DestinationAddress").Value), Distance = Convert.ToDouble(distance.Element("Distance").Value) }).ToList(); } catch (Exception e) { MessageBox.Show(e.ToString()); } DataSource.DistancesList = distancesList; return(DAL_Class.GetClonedList(DataSource.DistancesList)); }
public List <Test> GetAllTests() { LoadTestersFile(); List <Test> testsList = new List <Test>(); try { testsList = (from test in testsRoot.Elements() select new Test() { TestId = Convert.ToInt32(test.Element("TestId").Value), TesterId = test.Element("TesterId").Value, TraineeId = test.Element("TraineeId").Value, TestDateAndTime = DateTime.Parse(test.Element("TestDateAndTime").Value), TestLocation = ConvertStringToAddressStruct(test.Element("TestLocation").Value), IsPassed = ConvertStringToNullableBool(test.Element("IsPassed").Value), TesterNotes = test.Element("TesterNotes").Value, CarType = ConvertStringToCarTypeEnum(test.Element("CarType").Value), DrivingSchool = ConvertStringToDrivingSchool(test.Element("DrivingSchool").Value), DMV = test.Element("DMV").Value }).ToList(); } catch (Exception e) { MessageBox.Show(e.ToString()); } DataSource.TestsList = testsList; return(DAL_Class.GetClonedList(DataSource.TestsList)); }
protected void btnsubmit_Click(object sender, EventArgs e) { if (ctrlGoogleReCaptcha.Validate()) { try { if (txtname.Text == string.Empty) { return; } //if (base.Request.Form["g-recaptcha-response"].ToString() != "") //{ DAL_Class dal = new DAL_Class(); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(string.Concat(new string[] { "<h3 style='text-align: center'>Enquiry from SIIinfotech.com</h3><table style='border: 1px solid #ddd;width: 100%;max-width: 100%;margin-bottom: 20px;border-spacing: 0;border-collapse: collapse;'><tbody style='display: table-row-group;vertical-align: middle;border-color: inherit;'><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Name </b>:</td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", this.txtname.Text.Trim(), "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Email ID</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", this.txtemailid.Text.Trim(), "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>Subject</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", this.txtsubject.Text.Trim(), "</td></tr><tr><td style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'><b>IP Address</b> : </td><td style='font-size:14px;border: 1px solid #ddd;width:70%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>", this.GetIPAddress() })); stringBuilder.Append("</td></tr></table><br/><br/><b style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>Message </b>: <span style='font-size:14px;border: 1px solid #ddd;width:30%;padding: 8px;line-height: 1.42857143;vertical-align: top;border-top: 1px solid #ddd;'>" + this.txtmessage.Text.Trim() + "</span></br>"); //this.sendMail("[email protected], [email protected]", "Enquiry From SIINfotech.com : Contact Form", stringBuilder.ToString(), "| Contact Form", "", null); dal.sendMail("[email protected], [email protected]", "*****@*****.**", stringBuilder.ToString(), "Enquiry From SIINfotech.com : Online Enquiry Form", null, null, null); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Form Submitted successfully');", true); txtname.Text = string.Empty; txtemailid.Text = string.Empty; txtsubject.Text = string.Empty; txtmessage.Text = string.Empty; Response.Redirect("ThankYou.aspx"); return; } catch (Exception ex) { ex.ToString(); // this.sendMail("[email protected], [email protected]", "Mail from SIInfotech.com enquiry", ex.Message.ToString() + ";" + this.txtname.Text.Trim() + "," + this.txtemailid.Text.Trim() + "," + this.txtsubject.Text.Trim() + "," + this.txtmessage.Text.Trim(), "Enquiry From example.com", "", null); } } else { //captcha challenge failed Label1.Text = "Captcha Failed!! Please try again!!"; txtname.Text = string.Empty; txtemailid.Text = string.Empty; txtsubject.Text = string.Empty; txtmessage.Text = string.Empty; } }
public List <Trainee> GetAllTrainees() { LoadTraineesFile(); List <Trainee> traineesList = new List <Trainee>(); try { traineesList = (from trainee in traineesRoot.Elements() select new Trainee() { Id = trainee.Element("Id").Value, LastName = trainee.Element("LastName").Value, FirstName = trainee.Element("FirstName").Value, DateOfBirth = Utilities.ConvertStringToMyDate(trainee.Element("DateOfBirth").Value), Gender = ConvertStringToGenderEnum(trainee.Element("Gender").Value), PhoneNumber = trainee.Element("PhoneNumber").Value, Address = ConvertStringToAddressStruct(trainee.Element("Address").Value), //Person EmailAddress = trainee.Element("EmailAddress").Value, CarType = ConvertStringToCarTypeEnum(trainee.Element("CarType").Value), GearType = ConvertStringToGearTypeEnum(trainee.Element("GearType").Value), FullDrivingSchoolDetails = ConvertStringToDrivingSchool(trainee.Element("DrivingSchool").Value), DrivingSchoolTeacher = trainee.Element("DrivingTeacher").Value, DrivingLessonsCount = int.Parse(trainee.Element("DrivingLessonsCount").Value), OwnedLisences = ConvertXElementToOwnedLisences(trainee.Element("OwnedLisences")), ScheduleList = ConvertXElementToScheduleList(trainee.Element("ScheduleList")) }).ToList(); } catch (Exception e) { MessageBox.Show(e.ToString()); } DataSource.TraineesList = traineesList; return(DAL_Class.GetClonedList(DataSource.TraineesList)); }
//D.M.V public List <string> GetAllDMVs() { return(DAL_Class.GetClonedList(DataSource.DmvList)); }
public List <DrivingSchool> GetAllDrivingSchools() { return(DAL_Class.GetClonedList(DataSource.DrivingSchools)); }
public List <string> GetAllDrivingSchoolsCitiesStringFormat() { return(DAL_Class.GetClonedList(DataSource.DrivingSchoolsCitiesStringFormat)); }
public List <string> GetAllCitiesStringFormat() { return(DAL_Class.GetClonedList(DataSource.CitiesStringList)); }
//Cities public List <City> GetAllCities() { return(DAL_Class.GetClonedList(DataSource.CitiesList)); }