private void BindFamilyDetails(string Emp_id) { try { objEmpFam.OpName = "SELECTALL"; objEmpFam.Emp_id = Emp_id.ToString(); DataSet ds = objDALFaList.GetFamilyList(objEmpFam); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { gvFamilyDetails.DataSource = ds; Session["dt"] = ds.Tables[0]; gvFamilyDetails.DataBind(); } else { gvFamilyDetails.DataSource = null; gvFamilyDetails.DataBind(); } } catch (Exception e) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", e.Message); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { ccl = new CommanClass(); // Loaddata(); Session["UserType"] = "Hirer"; // divprofile.Visible = true; if (ccl.isLogedin() == false) { // divusertype.Visible = true; // divprofile.Visible = true; } else if (ccl.isLogedin() == true) { // divprofile.Visible = true; if (ccl.UserType() == "Contractor") { divhirer.Visible = true; } else { divhirer.Visible = true; } } } } catch (Exception ex) { ex.ToString(); // ccl.ShowError(ex); } }
private void GetPaymentDetails(int PaymentId) { try { obj_payvouch.OpName = "SELECT1"; obj_payvouch.epm_id = PaymentId; DataSet Objds = objdal_payvouch.GetEmployeePaymentVoucher(obj_payvouch); if (Objds.Tables[0].Rows.Count > 0) { hf_epm_id.Value = Objds.Tables[0].Rows[0]["epm_id"].ToString(); dropDebit.SelectedIndex = dropDebit.Items.IndexOf(dropDebit.Items.FindByValue(Objds.Tables[0].Rows[0]["epm_debit"].ToString())); txtPaidTo.Text = Objds.Tables[0].Rows[0]["epm_paid"].ToString(); txtAmount.Text = Objds.Tables[0].Rows[0]["epm_amount"].ToString(); dropPaymentMode.SelectedIndex = dropPaymentMode.Items.IndexOf(dropPaymentMode.Items.FindByValue(Objds.Tables[0].Rows[0]["epm_payment_mode"].ToString())); txtTowards.Text = Objds.Tables[0].Rows[0]["epm_towards"].ToString(); txtDate.Text = System.DateTime.Now.ToShortDateString(); } } catch (Exception e) { lblMsg.Text = CommanClass.ShowMessage("danger", "Danger", e.Message); } }
private void GetBankDetails(int srno) { try { objclsBank.OpName = "SELECT1"; objclsBank.S_No = srno; objclsBank.empid = srno.ToString(); DataSet Objds = objBankDetails.GetEmpBD(objclsBank); if (Objds.Tables[0].Rows.Count > 0) { hf_emp_ID.Value = Objds.Tables[0].Rows[0]["S_No"].ToString(); txtBankName.Text = Objds.Tables[0].Rows[0]["emp_bankname"].ToString(); txtAccountNo.Text = Objds.Tables[0].Rows[0]["emp_accno"].ToString(); ddlAccountType.SelectedIndex = ddlAccountType.Items.IndexOf(ddlAccountType.Items.FindByText(Objds.Tables[0].Rows[0]["emp_acctype"].ToString())); txtIFSCCode.Text = Objds.Tables[0].Rows[0]["emp_ifsccode"].ToString(); txtBranchName.Text = Objds.Tables[0].Rows[0]["emp_branchname"].ToString(); txtBankCity.Text = Objds.Tables[0].Rows[0]["emp_bankcity"].ToString(); txtPFAccountNo.Text = Objds.Tables[0].Rows[0]["emp_pfaccno"].ToString(); txtUAN.Text = Objds.Tables[0].Rows[0]["emp_UAN"].ToString(); } } catch (Exception e) { labelError.Text = CommanClass.ShowMessage("danger", "Error", e.Message); } }
public void GetEduDetails(int Srno) { try { objEducation.OpName = "SELECT1"; objEducation.S_No = Srno; objEducation.emp_id = Emp_id; DataSet ds = objDALEdu.GetEmpEducation(objEducation); if (ds.Tables[0].Rows.Count > 0) { hf_Sno.Value = ds.Tables[0].Rows[0]["S_No"].ToString(); DropEducationType.SelectedIndex = DropEducationType.Items.IndexOf(DropEducationType.Items.FindByText(ds.Tables[0].Rows[0]["Edu_Type"].ToString())); DropEducationLevel.SelectedValue = ds.Tables[0].Rows[0]["Edu_Level"].ToString(); txtSchoolOrCollegeName.Text = ds.Tables[0].Rows[0]["SchoolName"].ToString(); txtBoardOrUniversityName.Text = ds.Tables[0].Rows[0]["BoardName"].ToString(); txtSpecialization.Text = ds.Tables[0].Rows[0]["Specialization"].ToString(); DropYear.SelectedIndex = DropYear.Items.IndexOf(DropYear.Items.FindByValue(ds.Tables[0].Rows[0]["YearOfPassing"].ToString())); txtPercentage.Text = ds.Tables[0].Rows[0]["Percentage"].ToString(); ddlCategory.SelectedIndex = ddlCategory.Items.IndexOf(ddlCategory.Items.FindByText(ds.Tables[0].Rows[0]["Category"].ToString())); txtStartDate.Text = ds.Tables[0].Rows[0]["StartDate"].ToString(); txtEndDate.Text = ds.Tables[0].Rows[0]["EndDate"].ToString(); } } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void BindAvailableReview() { try { DataSet ds = new DataSet(); ds = _objEmp.GetEmpByDesignation(objclsEmployee); if (ds.Tables[0].Rows.Count > 0) { listAvailableReview.DataSource = ds.Tables[0]; listAvailableReview.DataTextField = "FullName"; listAvailableReview.DataValueField = "emp_id"; listAvailableReview.DataBind(); } else { listAvailableReview.DataSource = null; listAvailableReview.DataBind(); } } catch (Exception ex) { lblError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void InsertEmpTracker() { try { if (Convert.ToInt32(hf_track_id.Value) > 0) { objempTracker.OpName = "UPDATE"; } else { objempTracker.OpName = "INSERT"; } objempTracker.TrackerId = Convert.ToInt32(hf_track_id.Value); objempTracker.TrackerName = txtTrackerName.Text; objempTracker.EmployeeName = dropEmployeeName.SelectedItem.Text; objempTracker.EmpId = dropEmployeeName.SelectedValue; //objempTracker.EmpId = Emp_id; objempTracker.AvailableReviewers = listAvailableReview.SelectedValue; objempTracker.AssignedReviewers = listAvailableReview.SelectedValue; } catch (Exception ex) { lblError.Text = CommanClass.ShowMessage("danger", "Error", ex.Message); } }
private void BindShiftDetails() { try { objWorkShift.OpName = "SELECTALL"; objWorkShift.ShiftName = "null"; // objWorkShift.FromDate = //objWorkShift.ToDate={00:00:00}; DataSet ds = objDALWorkShift.GetWorkShift(objWorkShift); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { gvWorkShiftList.DataSource = ds; } else { gvWorkShiftList.DataSource = null; } gvWorkShiftList.PageSize = Convert.ToInt32(DropPage.SelectedValue); gvWorkShiftList.DataBind(); } catch (Exception ex) { lblError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void GetCandidate(int CandId) { try { objclCandidate.OpName = "SELECT1"; objclCandidate.CandidateId = CandId; DataSet Objds = objDALCandidate.GetCandidateDetails(objclCandidate); if (Objds.Tables[0].Rows.Count > 0) { hf_can_id.Value = Objds.Tables[0].Rows[0]["CandidateId"].ToString(); txtFirstName.Text = Objds.Tables[0].Rows[0]["FirstName"].ToString(); txtMiddleName.Text = Objds.Tables[0].Rows[0]["MiddleName"].ToString(); txtLastName.Text = Objds.Tables[0].Rows[0]["LastName"].ToString(); txtEmailId.Text = Objds.Tables[0].Rows[0]["EmailID"].ToString(); txtContactNo.Text = Objds.Tables[0].Rows[0]["ContactNo"].ToString(); ddlJobVacancy.SelectedIndex = ddlJobVacancy.Items.IndexOf(ddlJobVacancy.Items.FindByValue(Objds.Tables[0].Rows[0]["JobVacancy"].ToString())); txtKeyWords.Text = Objds.Tables[0].Rows[0]["Keyword"].ToString(); txtComment.Text = Objds.Tables[0].Rows[0]["Comments"].ToString(); txtApplicationDate.Text = Objds.Tables[0].Rows[0]["ApplicationDate"].ToString(); lblResume.Text = Objds.Tables[0].Rows[0]["CanResumeUpload"].ToString(); hfResumeFileName.Value = Objds.Tables[0].Rows[0]["CanResumeFilePath"].ToString(); //ResumeFileName = Objds.Tables[0].Rows[0]["FilePath"].ToString(); //pdfView.Attributes["href"] = "FilesUpload/" + ResumeFileName; } } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void GetOrganisationDetails(int orgid) { try { objorg_det.OpName = "SELECT"; objorg_det.oim_id = orgid; DataSet ds = dalobjorg_det.getOrganisationDetails(objorg_det); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { hf_oim_id.Value = ds.Tables[0].Rows[0]["oim_id"].ToString(); txtOrganisationName.Text = ds.Tables[0].Rows[0]["oim_org_name"].ToString(); txtTaxID.Text = ds.Tables[0].Rows[0]["oim_tax_id"].ToString(); txtNumberOfEmployees.Text = ds.Tables[0].Rows[0]["oim_num_emp"].ToString(); txtRegistrationNumber.Text = ds.Tables[0].Rows[0]["oim_reg_num"].ToString(); txtPhone.Text = ds.Tables[0].Rows[0]["oim_phone"].ToString(); txtFax.Text = ds.Tables[0].Rows[0]["oim_fax"].ToString(); txtEmail.Text = ds.Tables[0].Rows[0]["oim_email"].ToString(); txtAddressStreet1.Text = ds.Tables[0].Rows[0]["oim_addr1"].ToString(); txtAddressStreet2.Text = ds.Tables[0].Rows[0]["oim_addr2"].ToString(); txtCity.Text = ds.Tables[0].Rows[0]["oim_city"].ToString(); txtState.Text = ds.Tables[0].Rows[0]["oim_state"].ToString(); txtZip.Text = ds.Tables[0].Rows[0]["oim_post_code"].ToString(); dropCountry.SelectedIndex = dropCountry.Items.IndexOf(dropCountry.Items.FindByText(ds.Tables[0].Rows[0]["oim_country"].ToString())); txtNote.Text = ds.Tables[0].Rows[0]["oim_note"].ToString(); } } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void BindEmployeeName() { try { DataSet ds = new DataSet(); ds = _objEmp.GetHiringManager(objclsEmployee); if (ds.Tables[0].Rows.Count > 0) { dropEmployeeName.Items.Add(new ListItem("-Select-", "-1")); dropEmployeeName.DataSource = ds.Tables[0]; dropEmployeeName.DataTextField = "FullName"; dropEmployeeName.DataValueField = "emp_id"; dropEmployeeName.DataBind(); } else { dropEmployeeName.DataSource = null; dropEmployeeName.DataBind(); } } catch (Exception ex) { lblError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
void BindEducationLevelDetails() { try { DataSet ds = new DataSet(); ds = objDALEdu.GetEduLevel(objEducation); if (ds.Tables[0].Rows.Count > 0) { DropEducationLevel.DataSource = ds.Tables[0]; DropEducationLevel.DataTextField = "EduLevel_Name"; DropEducationLevel.DataValueField = "EduLevel_Id"; DropEducationLevel.SelectedValue = "EduType_Id"; DropEducationLevel.DataBind(); DropEducationLevel.Items.Insert(0, new ListItem("--Select Education Level--", "-1")); } else { DropEducationLevel.DataSource = null; DropEducationLevel.DataBind(); } } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void GetPassport(int PassId) { try { objpass.OpName = "SELECT1"; objpass.passportid = PassId; DataSet Objds = objDALPassport.GetPassportDetails(objpass); if (Objds.Tables[0].Rows.Count > 0) { hf_pass_id.Value = Objds.Tables[0].Rows[0]["PassportId"].ToString(); txtEmployeeName.Text = Objds.Tables[0].Rows[0]["EmployeeName"].ToString(); txtPassportNumber.Text = Objds.Tables[0].Rows[0]["PasportNumber"].ToString(); txtPassportIssuedate.Text = Objds.Tables[0].Rows[0]["PassportIssuedate"].ToString(); txtPassportIssuedate.Text = Objds.Tables[0].Rows[0]["PassportExpiryDate"].ToString(); txtPanNo.Text = Objds.Tables[0].Rows[0]["PanNumber"].ToString(); txtAdharNo.Text = Objds.Tables[0].Rows[0]["AdharNumber"].ToString(); lblPassport.Text = Objds.Tables[0].Rows[0]["ImageUpload"].ToString(); hfPassportFileName.Value = Objds.Tables[0].Rows[0]["ImageFilePath"].ToString(); //ResumeFileName = Objds.Tables[0].Rows[0]["FilePath"].ToString(); //pdfView.Attributes["href"] = "FilesUpload/" + ResumeFileName; } } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
public void SendMail(string ToMail) { DataSet ds = _objServiceRequestBL.get_config_mst(); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { string SmtpServer = ds.Tables[0].Rows[0]["con_smtp_host"].ToString(); int SmtpPort = Convert.ToInt32(ds.Tables[0].Rows[0]["con_smtp_port"].ToString()); string MailFrom = ds.Tables[0].Rows[0]["con_mail_from"].ToString(); string DisplayNameFrom = ds.Tables[0].Rows[0]["con_from_name"].ToString(); string FromPassword = ds.Tables[0].Rows[0]["con_from_pwd"].ToString(); string MailTo = ToMail; string DisplayNameTo = ""; string MailCc = ds.Tables[0].Rows[0]["con_mail_cc"].ToString(); string mailCc2 = ds.Tables[0].Rows[0]["con_mail_cc1"].ToString(); string DisplayNameCc = ""; string MailBcc = ""; string Subject = "Activ8 Group"; string MailText; string Attachment = ""; MailText = "Hi, <br/><br/> Thanks for making contact, Mr.Tony will reply to your Query.<br/></b> <br/><br/> Thank you, <br/><br/><strong> Activ8 System Admin.</strong><br/>"; CommanClass.UpdateMail(SmtpServer, SmtpPort, MailFrom, DisplayNameFrom, FromPassword, MailTo, DisplayNameTo, MailCc, mailCc2, "", "", DisplayNameCc, MailBcc, Subject, MailText, Attachment); } }
private void BindVacancyName() { try { DataSet ds = new DataSet(); ds = objDALDesg.GetDesignationByDes(objEmDesg); if (ds.Tables[0].Rows.Count > 0) { ddlJobTitle.DataSource = ds.Tables[0]; ddlJobTitle.DataTextField = "Designation"; ddlJobTitle.DataValueField = "Designation_Id"; ddlJobTitle.DataBind(); } else { ddlJobTitle.DataSource = null; ddlJobTitle.DataBind(); } } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { InsertEmpTracker(); btnAdd_Click(sender, e); int Result = objDALTracker.InsertEmpTracker(objempTracker); if (Result > 0) { if (btnSubmit.Text == "Save") { lblError.Text = CommanClass.ShowMessage("success", "Success", "Tracker Details Created Successfully !!"); } else { lblError.Text = CommanClass.ShowMessage("success", "Success", "Tracker Details Updated Successfully !!"); } GetTracker(); BindTrackerList(); clearcontrols(); } else { lblError.Text = CommanClass.ShowMessage("info", "Info", "Tracker details not created please try again"); } } catch (Exception ex) { } }
protected void Page_Load(object sender, EventArgs e) { Emp_id = Request.QueryString["emp_id"]; string Emp_firstname = Request.QueryString["Emp_firstname"]; // emp_Id = Convert.ToInt32(Request.QueryString["emp_id"]); if (!IsPostBack) { if (Emp_id == "" || Emp_id == null) { Response.Redirect("/login.aspx"); } else { ViewState["ps"] = 10; BindEducationDetails(Emp_id); // BindEducationLevelDetails(); CommanClass.Get_year(DropYear); if (Emp_id != null & Emp_firstname != null) { lblEmpIdName.Text = "Emp_Id-" + Emp_id + " , Name-" + Emp_firstname; string EmployeeEduId = Request.QueryString["Emp_id"]; } } } }
private void GetEmployeeDetails(string EmployeeId) { try { objclsEmployee.EmpID = EmployeeId; objclsEmployee.OpName = "SELECT1"; DataSet Objds = _objEmp.GetEmployeeDetails(objclsEmployee); if (Objds.Tables[0].Rows.Count > 0) { hf_S_No.Value = Objds.Tables[0].Rows[0]["S_No"].ToString(); txtEmployeeID.Text = Objds.Tables[0].Rows[0]["emp_id"].ToString(); txtEmployeeID.Enabled = false; txtFirstName.Text = Objds.Tables[0].Rows[0]["emp_firstname"].ToString(); txtMiddleName.Text = Objds.Tables[0].Rows[0]["emp_middlename"].ToString(); txtLastName.Text = Objds.Tables[0].Rows[0]["emp_lastname"].ToString(); txtDateOfJoining.Text = Objds.Tables[0].Rows[0]["emp_doj"].ToString(); txtDateOfJoining.ReadOnly = true; txtDateOfBirth.Text = Objds.Tables[0].Rows[0]["emp_dob"].ToString(); txtDateOfBirth.ReadOnly = true; ddlDepartment.SelectedIndex = ddlDepartment.Items.IndexOf(ddlDepartment.Items.FindByValue(Objds.Tables[0].Rows[0]["emp_dept"].ToString())); get_Depart_Desig(ddlDepartment, ddlDesignation); ddlDesignation.SelectedIndex = ddlDesignation.Items.IndexOf(ddlDesignation.Items.FindByValue(Objds.Tables[0].Rows[0]["emp_design"].ToString())); // ddlDepartment.SelectedIndex = ddlDepartment.Items.IndexOf(ddlDepartment.Items.FindByValue(Objds.Tables[0].Rows[0]["emp_design"].ToString())); //txtLoginId.Text = Objds.Tables[0].Rows[0]["emp_login"].ToString(); //txtPassword.Text = Objds.Tables[0].Rows[0]["emp_pwd"].ToString(); txtMobileNo.Text = Objds.Tables[0].Rows[0]["emp_mobile"].ToString(); txtEmailId.Text = Objds.Tables[0].Rows[0]["emp_email"].ToString(); txtEmailId.ReadOnly = true; //txtManager.Text = Objds.Tables[0].Rows[0]["emp_mgr"].ToString(); //txtManager.Enabled = false; ddlStatus.SelectedIndex = ddlStatus.Items.IndexOf(ddlStatus.Items.FindByValue(Objds.Tables[0].Rows[0]["emp_status"].ToString())); txtPanNo.Text = Objds.Tables[0].Rows[0]["emp_panno"].ToString(); txtAdharNo.Text = Objds.Tables[0].Rows[0]["emp_adharno"].ToString(); txtAddress.Text = Objds.Tables[0].Rows[0]["emp_address"].ToString(); txtPassportNo.Text = Objds.Tables[0].Rows[0]["emp_passportno"].ToString(); txtExpiryDate.Text = Objds.Tables[0].Rows[0]["emp_pasexpirydate"].ToString(); Panel1.Visible = false; //lblResume.Text = Objds.Tables[0].Rows[0]["ResumeUpload"].ToString(); hfResumeFileName.Value = Objds.Tables[0].Rows[0]["ResumeFilePath"].ToString(); //revfuResumeImage.Enabled = false; ddlLocation.SelectedIndex = ddlLocation.Items.IndexOf(ddlLocation.Items.FindByValue(Objds.Tables[0].Rows[0]["emp_location"].ToString())); ResumeFileName = Objds.Tables[0].Rows[0]["ResumeFilePath"].ToString(); pdfView.Attributes["href"] = "ResumeDoc/" + ResumeFileName; lblResume.Text = Objds.Tables[0].Rows[0]["ResumeFilePath"].ToString(); hf_ImageFile.Value = Objds.Tables[0].Rows[0]["ImageFilePath"].ToString(); ImageFileName = Objds.Tables[0].Rows[0]["ImageFilePath"].ToString(); imgphoto.ImageUrl = "EmployeeImages/" + ImageFileName; //imgphoto.ImageUrl = "EmployeeImages/" + fuImageFile.FileName; imgphoto.Visible = true; lblImage.Text = Objds.Tables[0].Rows[0]["ImageFilePath"].ToString(); } } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void GetLocation(int LocId) { try { objEmLoc.OpName = "SELECT1"; objEmLoc.LocationId = LocId; DataSet objDs = objDALLoc.GetLocation(objEmLoc); if (objDs.Tables[0].Rows.Count > 0) { hf_LocationId.Value = objDs.Tables[0].Rows[0]["LocationId"].ToString(); txtName.Text = objDs.Tables[0].Rows[0]["Location"].ToString(); dropCountry.SelectedIndex = dropCountry.Items.IndexOf(dropCountry.Items.FindByText(objDs.Tables[0].Rows[0]["Country"].ToString())); //dropCountry.SelectedValue = objDs.Tables[0].Rows[0]["Country"].ToString(); txtState.Text = objDs.Tables[0].Rows[0]["State"].ToString(); txtCity.Text = objDs.Tables[0].Rows[0]["City"].ToString(); txtAddress.Text = objDs.Tables[0].Rows[0]["Address"].ToString(); txtZip.Text = objDs.Tables[0].Rows[0]["PostalCode"].ToString(); txtPhone.Text = objDs.Tables[0].Rows[0]["Phone"].ToString(); txtFax.Text = objDs.Tables[0].Rows[0]["Fax"].ToString(); txtNotes.Text = objDs.Tables[0].Rows[0]["Notes"].ToString(); } } catch (Exception ex) { lblError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
protected void btnRegister_Click(object sender, EventArgs e) { using (SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["Conn"])) { try { string filename = ""; filename = "Upload/Logo/userbg.png"; Connection.Open_Connection(con); cmd = new SqlCommand("spRegister", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@QueryType", SqlDbType.VarChar, 10).Value = "Insert"; cmd.Parameters.Add("@RegisterType", SqlDbType.VarChar, 15).Value = Session["UserType"].ToString(); cmd.Parameters.Add("@CategoryName", SqlDbType.VarChar, 20).Value = ""; cmd.Parameters.Add("@Firstname", SqlDbType.VarChar, 50).Value = txtName.Text; cmd.Parameters.Add("@LastName", SqlDbType.VarChar, 50).Value = txtLastName.Text; cmd.Parameters.Add("@UserName", SqlDbType.NVarChar, 15).Value = txtUserName.Text; cmd.Parameters.Add("@Password", SqlDbType.NVarChar, 30).Value = txtPassword.Text; cmd.Parameters.Add("@Email", SqlDbType.NVarChar, 255).Value = txtEmail.Text; cmd.Parameters.Add("@Address", SqlDbType.NVarChar, 50).Value = txtAddress.Text; cmd.Parameters.Add("@City", SqlDbType.NVarChar, 50).Value = ddlCity.Text; cmd.Parameters.Add("@Location", SqlDbType.VarChar, 20).Value = txtLocation.Text; cmd.Parameters.Add("@Mobile", SqlDbType.VarChar, 20).Value = txtContactno.Text; cmd.Parameters.Add("@CountryID", SqlDbType.VarChar, 5).Value = ddlCountry.SelectedValue.ToString(); cmd.Parameters.AddWithValue("@PhotoURL", filename); cmd.Parameters.Add("@Msg", SqlDbType.NVarChar, 255); cmd.Parameters["@Msg"].Direction = ParameterDirection.Output; cmd.Parameters.Add("@ProfileID", SqlDbType.Int); cmd.Parameters["@ProfileID"].Direction = ParameterDirection.Output; cmd.ExecuteNonQuery(); int profileid; string msg = cmd.Parameters["@Msg"].Value.ToString(); lblSinginError.Text = msg.ToString(); profileid = Convert.ToInt32(cmd.Parameters["@ProfileID"].Value.ToString()); if (msg == "OK") { Session["LoginUser"] = txtUserName.Text; Session["ProfileID"] = profileid; Session["UserType"] = "Hirer"; Session["RegStep"] = "1"; lblSinginError.ForeColor = System.Drawing.Color.Green; lblSinginError.Text = "Successfully Registered"; Response.Redirect("UpdatePics.aspx", false); } else { lblSinginError.Focus(); } } catch (Exception ex) { ccl = new CommanClass(); ccl.ShowError(ex); } finally { Connection.Close_Connection(con); } } }
public void SendMail(string ToMail) { string SmtpServer = "smtp.gmail.com";; int SmtpPort = 587; string MailFrom = "*****@*****.**"; string DisplayNameFrom = "Active8 CRM"; string FromPassword = "******"; string MailTo = ToMail; string DisplayNameTo = ""; string MailCc = ""; string DisplayNameCc = ""; string MailBcc = ""; string Subject = "Your Login Credentials"; string MailText; string Attachment = ""; MailCc = ""; MailText = "<table align='center' border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse; width: 100%; max-width: 600px;' class='content'>" + "<tr>" + "<td style='padding: 15px 10px 15px 10px;'>" + "<table border='0' cellpadding='0' cellspacing='0' width='100%'>" + " </table>" + "</td>" + "</tr>" + "<tr>" + " <td align='center' bgcolor='#bd1f2d' style='padding: 25px 20px 25px 20px; color: #ffffff; back font-family: Arial, sans-serif; font-size: 36px; font-weight: bold;height:113px !important;'>" + " <img src='http://fincrm.askswg.co.za/assets/dist/img/logo.jpg' alt='Activ8 Group' width='260' height='110' style='display:block;' />" + " </td>" + " </tr>" + " <tr>" + " <td align='center' bgcolor='#ffffff' style='padding: 75px 20px 40px 20px; color: #555555; font-family: Arial, sans-serif; font-size: 20px; line-height: 30px; border-bottom: 1px solid #f6f6f6;'>" + "Thanks for registering with Activ8 Group <br/><br/>" + "Your Login credentials <br/>" + "<table><tr><td style='text-align:right;'>User Id :</td><td><b> " + "Your User ID is your SAID" + "</b></td> </tr><tr><td style='text-align:right;'>Password :</td><td><b>" + ViewState["RandomPwd"].ToString() + "</b></td></tr></table>" + " </td>" + "</tr>" + " <tr>" + " <td align='center' bgcolor='#f9f9f9' style='padding: 30px 20px 30px 20px; font-family: Arial, sans-serif;'>" + " <table bgcolor='#1ABC9C' border='0' cellspacing='0' cellpadding='0' class='buttonwrapper'>" + " <tr>" + " <td align='center' height='50' style=' padding: 0 25px 0 25px; font-family: Arial, sans-serif; font-size: 16px; font-weight: bold; background-color: #bd1f2d;' class='button'>" + " <a href='http://fincrm.askswg.co.za' style='color: #ffffff; text-align: center; text-decoration: none;'>Login</a>" + " </td>" + " </tr>" + " </table>" + " </td>" + " </tr>" + " <tr>" + " <td align='center' bgcolor='#dddddd' style='padding: 15px 10px 15px 10px; color: #555555; font-family: Arial, sans-serif; font-size: 12px; line-height: 18px;'>" + " <b>ACTIV8 CAPITAL MANAGEMENT.</b><br/>33 Martin • Hammerschlag Way Foreshore • Cape Town, South Africa" + " </td>" + " </tr>" + " </table>"; CommanClass.UpdateMail(SmtpServer, SmtpPort, MailFrom, DisplayNameFrom, FromPassword, MailTo, DisplayNameTo, MailCc, "", "", "", DisplayNameCc, MailBcc, Subject, MailText, Attachment); }
private void GetTitle() { string PageName = HttpContext.Current.Request.Url.AbsolutePath.Substring(HttpContext.Current.Request.Url.AbsolutePath.LastIndexOf('/') + 1); string strTitel = CommanClass.GetPageTitle(PageName); Page.Title = strTitel; lblTitle.Text = strTitel; }
private void PrintPaySlip(DataSet ds, string ActualFile) { string TemplateFile = Path.Combine(Server.MapPath("pdfs"), "PaySlip.pdf"); string Date = System.DateTime.Now.ToShortDateString().ToString(); PdfReader pdfReader = new PdfReader(TemplateFile); PdfStamper pdfStamper = new PdfStamper(pdfReader, new FileStream(ActualFile, FileMode.Create)); AcroFields pdfFormFields = pdfStamper.AcroFields; if (ds.Tables[0].Rows.Count > 0) { decimal basic = Convert.ToDecimal(ds.Tables[0].Rows[0]["esm_basic"]); decimal hra = Convert.ToDecimal(ds.Tables[0].Rows[0]["esm_hra"]); decimal special_earnings = Convert.ToDecimal(ds.Tables[0].Rows[0]["esm_special_pay"]); decimal other_earnings = Convert.ToDecimal(ds.Tables[0].Rows[0]["esm_other_earnings"]); decimal total_earnings = basic + hra + special_earnings + other_earnings; string totalearnings = total_earnings.ToString(); decimal professional_tax = Convert.ToDecimal(ds.Tables[0].Rows[0]["esm_ptax"]); decimal loans = Convert.ToDecimal(ds.Tables[0].Rows[0]["esm_loans"]); decimal other_deductions = Convert.ToDecimal(ds.Tables[0].Rows[0]["esm_deductions"]); decimal total_deductions = professional_tax + loans + other_deductions; string totaldeductions = total_deductions.ToString(); int net_payable = Convert.ToInt32(ds.Tables[0].Rows[0]["esm_total_payable"]); string netpayable = NumberToWords(net_payable); string month = System.DateTime.Now.Month.ToString(); string year = System.DateTime.Now.Year.ToString(); month = CommanClass.Get_Month(month); pdfFormFields.SetField("Month", month + " " + year); pdfFormFields.SetField("EmpCode", ds.Tables[0].Rows[0]["emp_code"].ToString()); pdfFormFields.SetField("Name", ds.Tables[0].Rows[0]["emp_firstname"].ToString() + " " + ds.Tables[0].Rows[0]["emp_middlename"].ToString() + " " + ds.Tables[0].Rows[0]["emp_lastname"].ToString()); pdfFormFields.SetField("Designation", ds.Tables[0].Rows[0]["Designation"].ToString()); pdfFormFields.SetField("Department", ds.Tables[0].Rows[0]["Department"].ToString()); pdfFormFields.SetField("Location", ds.Tables[0].Rows[0]["Location"].ToString()); pdfFormFields.SetField("AcctNo", ds.Tables[0].Rows[0]["emp_accno"].ToString()); pdfFormFields.SetField("BankName", ds.Tables[0].Rows[0]["emp_bankname"].ToString()); pdfFormFields.SetField("PANNo", ds.Tables[0].Rows[0]["emp_panno"].ToString()); pdfFormFields.SetField("PFAcctNo", ds.Tables[0].Rows[0]["emp_pfaccno"].ToString()); pdfFormFields.SetField("UAN", ds.Tables[0].Rows[0]["emp_UAN"].ToString()); pdfFormFields.SetField("Basic&DA", ds.Tables[0].Rows[0]["esm_basic"].ToString()); pdfFormFields.SetField("HRA", ds.Tables[0].Rows[0]["esm_hra"].ToString()); pdfFormFields.SetField("SpecialAllowance", ds.Tables[0].Rows[0]["esm_special_pay"].ToString()); pdfFormFields.SetField("OtherEarnings", ds.Tables[0].Rows[0]["esm_other_earnings"].ToString()); pdfFormFields.SetField("TotalEarnings", totalearnings); pdfFormFields.SetField("ProfessionalTax", ds.Tables[0].Rows[0]["esm_ptax"].ToString()); pdfFormFields.SetField("Loans/Advance", ds.Tables[0].Rows[0]["esm_loans"].ToString()); pdfFormFields.SetField("OtherDeductions", ds.Tables[0].Rows[0]["esm_deductions"].ToString()); pdfFormFields.SetField("TotalDeductions", totaldeductions); pdfFormFields.SetField("NetAmount", ds.Tables[0].Rows[0]["esm_total_payable"].ToString()); pdfFormFields.SetField("InWords1", netpayable + " " + "Only"); pdfFormFields.SetField("Date", Date); } pdfStamper.FormFlattening = true; pdfStamper.Close(); }
protected void btnRegister_Click(object sender, EventArgs e) { try { string filename = ""; filename = "Upload/Logo/userbg.png"; Connection.Open_Connection(con); cmd = new SqlCommand("spRegister", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@QueryType", SqlDbType.VarChar, 10).Value = "Insert"; cmd.Parameters.Add("@RegisterType", SqlDbType.VarChar, 15).Value = Session["UserType"].ToString(); cmd.Parameters.Add("@CategoryName", SqlDbType.VarChar, 20).Value = ""; cmd.Parameters.Add("@Firstname", SqlDbType.VarChar, 50).Value = txtName.Value.ToString(); cmd.Parameters.Add("@LastName", SqlDbType.VarChar, 50).Value = txtLastName.Value.ToString(); cmd.Parameters.Add("@UserName", SqlDbType.NVarChar, 15).Value = txtUserName.Value; cmd.Parameters.Add("@Password", SqlDbType.NVarChar, 30).Value = txtPassword.Value; cmd.Parameters.Add("@Email", SqlDbType.NVarChar, 255).Value = txtEmail.Value; cmd.Parameters.Add("@Address", SqlDbType.NVarChar, 50).Value = txtAddress.Value; cmd.Parameters.Add("@City", SqlDbType.NVarChar, 50).Value = ddlCity.Value; cmd.Parameters.Add("@Location", SqlDbType.VarChar, 20).Value = txtLocation.Value; cmd.Parameters.Add("@Mobile", SqlDbType.VarChar, 20).Value = txtContactno.Value; cmd.Parameters.Add("@CountryID", SqlDbType.VarChar, 5).Value = ddlCountry.SelectedValue; cmd.Parameters.AddWithValue("@PhotoURL", filename); cmd.Parameters.Add("@Msg", SqlDbType.NVarChar, 255); cmd.Parameters["@Msg"].Direction = ParameterDirection.Output; cmd.Parameters.Add("@ProfileID", SqlDbType.Int); cmd.Parameters["@ProfileID"].Direction = ParameterDirection.Output; cmd.ExecuteNonQuery(); int profileid; string msg = cmd.Parameters["@Msg"].Value.ToString(); lblSinginError.Text = msg.ToString(); profileid = Convert.ToInt32(cmd.Parameters["@ProfileID"].Value.ToString()); if (msg == "OK") { Session["LoginUser"] = txtUserName.Value; Session["ProfileID"] = profileid; lblSinginError.ForeColor = System.Drawing.Color.Green; lblSinginError.Text = "Successfully Registered"; //Response.Redirect(System.Web.HttpContext.Current.Request.Url.AbsoluteUri.ToString()); divprofile.Visible = false; Response.Redirect("ProfileHirer/FindCrew.aspx"); } else { lblSinginError.Focus(); } } catch (Exception ex) { ccl = new CommanClass(); ccl.ShowError(ex); } finally { Connection.Close_Connection(con); } }
public ActionResult RoomsReservations(CommanClass comman) { string resfrom = comman.room.ReservedFrom.ToString(); string resto = comman.room.ReservedTo.ToString(); string view = comman.roomfacility.View.ToString(); DateTime from1 = comman.room.ReservedFrom.Value; DateTime to = comman.room.ReservedTo.Value; int t = (to - from1).Days; // ViewBag.Message = "RoomsGallery Reservations"; int no = comman.room.No_of_Guests * t; var vprice = from r in db.RoomFacilities where r.View.Equals(view) select r.PricePerPerson *no; totprice = vprice.FirstOrDefault(); // var rms = from s in db.Rooms where s.No_of_Guests.Equals(no) && s.Reserved.Equals("false") || s.ReservedTo < comman.room.ReservedTo || s.ReservedFrom > comman.room.ReservedFrom select s.ID; var rms = from s in db.Rooms where s.No_of_Guests.Equals(no) && s.Reserved.Equals("false") || s.ReservedTo <comman.room.ReservedTo || s.ReservedFrom> comman.room.ReservedFrom select s; // var rms = from s in db.Rooms where s.No_of_Guests.Equals(no) select s; // var rms = from s in db.Rooms where s.No_of_Guests.Equals(no) && s.Reserved.Equals("false") || s.ReservedTo < rooms.ReservedFrom || s.ReservedFrom > rooms.ReservedTo select s; // rms = rms.Where(s => s.No_of_Guests.Equals(no)); // rms = rms.Where(s => s.ClassType.Contains("Class A")); int rmscount; try { rmscount = rms.Count(); } catch (NullReferenceException e) { rmscount = 0; } if (rmscount > 0) { // int id = rms.FirstOrDefault(); return(RedirectToAction("Payment", "User", new { pri = totprice })); //return RedirectToAction("Payment", "User", new { area = "" }); } else { ModelState.AddModelError("", "Sorry!!! Rooms not available"); ViewBag.Message = "Sorry!!! No Rooms available in this Category"; return(View()); } // return View(); }
private void DeleteEducationDetails(int S_No, string Emp_id) { try { int result = objDAlExp.DeleteEmpExp(S_No, Emp_id); } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void chatMessage() { DataTable dt = new DataTable(); CommanClass ccl = new CommanClass(); string usertype = ccl.UserType(); string id = Request.QueryString["id"].ToString(); dt = chat.ChatMessages(Convert.ToInt32(Session["ProfileID"]), usertype, Convert.ToInt32(id)); repeater2.DataSource = dt; repeater2.DataBind(); }
private void DeleteLocDetails(int LocationId) { try { int result = objDALLoc.DeleteLocation(LocationId); } catch (Exception ex) { lblError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
private void DeleteDesigDetails(int DesigId) { try { int result = objDALDesg.DeleteDesigDetails(DesigId); } catch (Exception ex) { lblError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }
//void BindYear() //{ // int year = DateTime.Now.Year +2 - 100; // for (int Y = year; Y <= DateTime.Now.Year + 2; Y++) // { // DropYear.Items.Add(new ListItem(Y.ToString(), Y.ToString())); // } //} private void DeleteEduDetails(int S_No) { try { int result = objDALEdu.DeleteEmpEducation(S_No); } catch (Exception ex) { labelError.Text = CommanClass.ShowMessage("danger", "Danger", ex.Message); } }