private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { // lngID = objDB.GerMaxIDNumber("PostingDivisionList", "PostingDivId");TrainingNeedType lngID = objDB.GerMaxIDNumber("TrainingNeedType", "TrainingNeedTypeID"); } else { lngID = Convert.ToInt32(hfID.Value); } Desigation objCnt = new Desigation(lngID.ToString(), txtTraniniType.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (ChkIsActive.Checked == true ? "N" : "Y")); objTM.InsTainingTypeWiseSubtype(grLocation, objCnt, hfIsUpadate.Value, IsDelete, (ChkIsActive.Checked == true ? "N" : "Y")); lblMsg.Text = Common.GetMessage(hfIsUpadate.Value.ToString(), IsDelete); Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(0); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SendEmail() { MasterTablesManager MasMgr = new MasterTablesManager(); MailManagerSmtpClient objMail = new MailManagerSmtpClient(); DataTable dt = MasMgr.GetEmailNotification(); string strRetText = ""; string strToAddr = dt.Rows[0]["Approval"].ToString().Trim(); string strCC = dt.Rows[0]["Notify"].ToString().Trim() + ";" + dt.Rows[0]["Verify"].ToString().Trim(); string strSubject = "Salary of " + ddlMonth.SelectedItem.ToString().Trim() + " has been waiting for your Approval"; string strBody = "Hi,<br />The salary has been reviwed and found ok, you may now approve."; string strFromAddr = Session["EMAILID"].ToString().Trim(); strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, strCC); if (strRetText == "Y") { lblMsg.Text = lblMsg.Text + ", and Email has been sent to Approve by CR."; } else { lblMsg.Text = lblMsg.Text + ", Email sending failed."; } }
private void SaveData(string IsDelete) { long lngID = 0; string strCmdType = ""; if (IsDelete == "Y") { strCmdType = "U"; } else { strCmdType = hfIsUpadate.Value == "N" ? "I" : "U"; } try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("HomeDistrictList", "DistId"); } else { lngID = Convert.ToInt32(hfID.Value); } DataTable dtData = objDS.Tables["HomeDistrictList"]; DataRow nRow = dtData.NewRow(); nRow["DistId"] = lngID; nRow["DistName"] = txtDistrict.Text.Trim(); nRow["HomeDivId"] = ddlDivision.SelectedValue.Trim(); nRow["IsActive"] = ChkIsActive.Checked == true ? "N" : "Y"; nRow["IsDeleted"] = "N"; if (hfIsUpadate.Value == "N") { nRow["InsertedBy"] = Session["USERID"].ToString(); nRow["InsertedDate"] = DateTime.Now.ToString(); } else { nRow["UpdatedBy"] = Session["USERID"].ToString(); nRow["UpdatedDate"] = DateTime.Now.ToString(); } dtData.Rows.Add(nRow); dtData.AcceptChanges(); MasMgr.SaveData(dtData, strCmdType); lblMsg.Text = Common.GetMessage(strCmdType); Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SendEmail() { MasterTablesManager MasMgr = new MasterTablesManager(); MailManagerSmtpClient objMail = new MailManagerSmtpClient(); DataTable dt = MasMgr.GetEmailNotification(); string strRetText = ""; string strToAddr = dt.Rows[0]["Review"].ToString().Trim(); string strCC = dt.Rows[0]["Notify"].ToString().Trim(); string strSubject = "Salary of " + ddlMonth.SelectedItem.ToString().Trim() + " has been waiting for ur Recommendation"; string strBody = "Hi,<br />The salary has been verified by Finance and found ok, you may recommend for approval."; string strFromAddr = Session["EMAILID"].ToString().Trim(); strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, strCC); if (strRetText == "Y") { lblMsg.Text = lblMsg.Text + ", and Email has been sent to Review by Director Finance."; } else { lblMsg.Text = lblMsg.Text + ", Email sending failed."; } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("BloodGroupList", "BloodGroupId"); } else { lngID = Convert.ToInt32(hfID.Value); } Desigation objCnt = new Desigation(lngID.ToString(), txtDesigation.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (ChkIsActive.Checked == true ? "N" : "Y")); MasMgr.InsertBloodGroupList(objCnt, hfIsUpadate.Value, IsDelete, (ChkIsActive.Checked == true ? "N" : "Y")); lblMsg.Text = Common.GetMessage(hfIsUpadate.Value.ToString(), IsDelete); Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SendEmail() { MasterTablesManager MasMgr = new MasterTablesManager(); MailManagerSmtpClient objMail = new MailManagerSmtpClient(); DataTable dt = MasMgr.GetEmailNotification(); string strRetText = ""; string strToAddr = dt.Rows[0]["Disburse"].ToString().Trim(); string strCC = dt.Rows[0]["Notify"].ToString().Trim() + ";" + dt.Rows[0]["Verify"].ToString().Trim() + ";" + dt.Rows[0]["Review"].ToString().Trim(); string strSubject = "Salary of " + ddlMonth.SelectedItem.ToString().Trim() + " has been Approved"; string strBody = "Salary is approved, please proceed for payment."; string strFromAddr = Session["EMAILID"].ToString().Trim(); strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, strCC); if (strRetText == "Y") { lblMsg.Text = lblMsg.Text + ", and Email has been sent to Disburse by Finance."; } else { lblMsg.Text = lblMsg.Text + ", Email sending failed."; } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpdate.Value == "N") { lngID = objDB.GerMaxIDNumber("EmpTypeList", "EmpTypeID"); } else { lngID = Convert.ToInt32(hfID.Value); } clsEmpType objEmpType = new clsEmpType(lngID.ToString(), txtEmpType.Text.Trim(), "", (chkInActive.Checked == true ? "N" : "Y"), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N"); MasMgr.InsertEmpType(objEmpType, hfIsUpdate.Value, IsDelete); lblMsg.Text = Common.GetMessage(hfIsUpdate.Value.ToString(), IsDelete); Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SendEmail() { MasterTablesManager MasMgr = new MasterTablesManager(); MailManagerSmtpClient objMail = new MailManagerSmtpClient(); DataTable dt = MasMgr.GetEmailNotification(); string strRetText = ""; string strToAddr = dt.Rows[0]["Notify"].ToString().Trim(); string strCC = dt.Rows[0]["Verify"].ToString().Trim() + ";" + dt.Rows[0]["Review"].ToString().Trim() + ";" + dt.Rows[0]["Approval"].ToString().Trim(); string strSubject = "Payroll has been Disbursed"; string strBody = ""; string strFromAddr = Session["EMAILID"].ToString().Trim(); strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, strCC); if (strRetText == "Y") { lblMsg.Text = lblMsg.Text + ", and Email has been sent to Notify previous Actors."; } else { lblMsg.Text = lblMsg.Text + ", Email sending failed."; } }
private void SaveData() { try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpdate.Value == "Y") { hfId.Value = hfId.Value; } else { hfId.Value = Common.getMaxId("EmpTempDutyAssignLog", "DutyAssignID"); } hfId.Value = txtEmpID.ToString(); string strStartDate = ""; string strEndDate = ""; if (string.IsNullOrEmpty(txtProcessDate.Text.Trim()) == false) { strStartDate = Common.ReturnDate(txtProcessDate.Text.Trim()); } if (string.IsNullOrEmpty(txtDueDate.Text.Trim()) == false) { strEndDate = Common.ReturnDate(txtDueDate.Text.Trim()); } //clsTempDutyAssign objclsTempDutyAssign = new clsTempDutyAssign //( // hfId.Value.ToString(), txtEmpID.Text.Trim(), ddlAction.SelectedValue.ToString(), ddlDistrict.SelectedValue.ToString(), ddlLocation.SelectedValue.ToString(), // ddlSector.SelectedValue.ToString(), ddlUnit.SelectedValue.ToString(), ddlDept.SelectedValue.ToString(), txtAssignment.Text.Trim(), strStartDate, strEndDate, // txtPercentage.Text.Trim(), txtAmount.Text.Trim(), txtSupervisorId.Text.Trim(), txtSupervisorComments.Text.Trim(), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()) //); objEmpInfoMgr.InsertFinalPayment(txtEmpID.Text.Trim(), strStartDate, strEndDate, txtPaymentAmt.Text.ToString(), txtPFAmount.Text.ToString(), txtRemarks.Text.ToString(), hfIsUpdate.Value); if (hfIsUpdate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else if (hfIsUpdate.Value == "Y") { lblMsg.Text = "Record Updated Successfully"; } else { lblMsg.Text = "Record Deleted Successfully"; } this.EntryMode(false); this.ClearControls(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("ProjectList", "ProjectId"); } else { lngID = Convert.ToInt32(hfID.Value); } clsProject objPrj = new clsProject(lngID.ToString(), txtProject.Text.Trim(), txtProjectCode.Text.Trim(), Common.ReturnDate(txtStartDate.Text.ToString()), Common.ReturnDate(txtEndDate.Text.ToString()), ddlWeekend.SelectedItem.Value.ToString(), ddlIncrement.SelectedItem.Value.ToString(), ddlIncrMonth.SelectedItem.Value.ToString(), txtIncrementYear.Text.ToString() == "" ? "0" : txtIncrementYear.Text.ToString(), (ChkIsActive.Checked == true ? "N" : "Y"), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString())); MasMgr.InsertUpProject(grBenefits, objPrj, hfIsUpadate.Value, IsDelete); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { StringBuilder strSBUID = new StringBuilder(); MasterTablesManager MasMgr = new MasterTablesManager(); string strValidFrom = ""; string strValidTo = ""; if (string.IsNullOrEmpty(txtValidFrom.Text.Trim()) == false) { strValidFrom = Common.ReturnDate(txtValidFrom.Text.Trim()); } if (string.IsNullOrEmpty(txtValidTo.Text.Trim()) == false) { strValidTo = Common.ReturnDate(txtValidTo.Text.Trim()); } //Filling Class Properties with values if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("DepartmentList", "DeptID"); } else { lngID = Convert.ToInt32(hfID.Value); } Department objDepartment = new Department(lngID.ToString(), txtDept.Text.Trim(), "", "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N/A", "N", "N", strSBUID.ToString(), (chkIsActive.Checked == true ? "N" : "Y")); MasMgr.InsertDepartment(objDepartment, hfIsUpadate.Value, IsDelete, strSBUID.ToString(), (chkIsActive.Checked == true ? "N" : "Y"), txtDeptCode.Text.Trim(), strValidFrom, strValidTo); Common.GetMessage(hfIsUpadate.Value, IsDelete); Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
protected void btnUploadMe_Click(object sender, EventArgs e) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("FileDetails", "FileId"); } else { lngID = Convert.ToInt32(hfID.Value); } if (fuFileUploader.PostedFile != null && fuFileUploader.PostedFile.ContentLength > 0) { string fileName = Path.GetFileName(fuFileUploader.PostedFile.FileName); string fileExtension = Path.GetExtension(fuFileUploader.PostedFile.FileName); string fileSavePath = Server.MapPath("~//MSBPolicyFile"); if (!Directory.Exists(fileSavePath)) { Directory.CreateDirectory(fileSavePath); } fileSavePath = fileSavePath + "//" + fileName; fuFileUploader.PostedFile.SaveAs(fileSavePath); FileInfo fileInfo = new FileInfo(fileSavePath); MasMgr.InsertMSBFILEList(lngID.ToString(), hfIsUpadate.Value, "N", fileName, fileInfo.Length.ToString(), fileExtension, fileSavePath); lblMsg.Text = "File Uploaded Successfully!"; lblMsg.ForeColor = System.Drawing.Color.Green; } else { lblMsg.Text = "Error: Please select a file to upload!"; } this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { StringBuilder strDivisionID = new StringBuilder(); MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("UnitList", "UnitId"); } else { lngID = Convert.ToInt32(hfID.Value); } Desigation objCnt = new Desigation(lngID.ToString(), txtSbu.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (chkInActive.Checked == true ? "N" : "Y")); MasMgr.InsertUnit(grDepartment, objCnt, hfIsUpadate.Value, IsDelete, (chkInActive.Checked == true ? "N" : "Y")); /* Division objDivision = new Division(lngID.ToString(), txtSbu.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N/A", "N", "N", (chkInActive.Checked == true ? "N" : "Y")); * * objMasMgr.InsertUnit(objDivision, hfIsUpadate.Value, IsDelete, (chkInActive.Checked == true ? "N" : "Y")); * * MasMgr.InsertUnit(grDepartment, objDivision, hfIsUpadate.Value, IsDelete, (chkInActive.Checked == true ? "N" : "Y"));*/ if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(0); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("ClinicList", "ClinicId"); } else { lngID = Convert.ToInt32(hfID.Value); } Clinic objCnt = new Clinic(lngID.ToString(), txtClinic.Text.Trim(), txtShortName.Text.Trim(), ddlClinicType.SelectedValue.ToString(), txtSunCode.Text.Trim(), txtBankAccNo.Text.Trim(), ddlBank.SelectedValue.ToString().Trim(), ddlBranch.SelectedValue.ToString().Trim(), (ChkIsActive.Checked == true ? "N" : "Y"), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "MSB"); MasMgr.InsertUpClinicList(objCnt, hfIsUpadate.Value, IsDelete); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("LocationCategory", "LocCatId"); } else { lngID = Convert.ToInt32(hfID.Value); } clsCommonSetup objSetup = new clsCommonSetup(lngID.ToString(), txtClinicType.Text.Trim(), (ChkIsActive.Checked == true ? "N" : "Y"), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N"); MasMgr.InsertLocationCategory(objSetup, hfIsUpadate.Value, IsDelete); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("GradeLevelList", "GradeLevelId"); } else { lngID = Convert.ToInt32(hfID.Value); } GradeEquiv objGrd = new GradeEquiv(lngID.ToString(), txtGrade.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (chkIsActive.Checked == true ? "N" : "Y"), ""); MasMgr.InsertGradeLevel(objGrd, hfIsUpadate.Value, IsDelete, (chkIsActive.Checked == true ? "N" : "Y")); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values //if (EntryMode(true)) // hfIsUpadate.Value="N"; if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("JobTitle", "JbTlId"); } else { lngID = Convert.ToInt32(hfID.Value); } Desigation objCnt = new Desigation(lngID.ToString(), txtDesigation.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (ChkIsActive.Checked == true ? "N" : "Y")); MasMgr.InsertDesignation(objCnt, hfIsUpadate.Value, IsDelete, (ChkIsActive.Checked == true ? "N" : "Y")); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("SalaryLocation", "SalLocId"); } else { lngID = Convert.ToInt32(hfID.Value); } Desigation objCnt = new Desigation(lngID.ToString(), txtDesigation.Text.Trim(), ddlCostCenterCode.SelectedItem.ToString().Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (ChkIsActive.Checked == true ? "N" : "Y")); MasMgr.InsertSalaryLocation(grSubLocation, objCnt, hfIsUpadate.Value, IsDelete, (ChkIsActive.Checked == true ? "N" : "Y")); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(0); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("CountryList", "CountryID"); } else { lngID = Convert.ToInt32(hfID.Value); } Country objCnt = new Country(lngID.ToString(), txtCountry.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N"); MasMgr.InsertCountry(objCnt, hfIsUpadate.Value, IsDelete); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("SpecialSkillList", "SpecSkillId"); } else { lngID = Convert.ToInt32(hfID.Value); } Department objDepartment = new Department(lngID.ToString(), txtDept.Text.Trim(), "", "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N/A", "N", "N", "", (chkIsActive.Checked == true ? "N" : "Y")); MasMgr.InsertSpecialSkill(objDepartment, hfIsUpadate.Value, IsDelete, "", (chkIsActive.Checked == true ? "N" : "Y")); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("Disiciplineinfo", "DisiciplineId"); } else { lngID = Convert.ToInt32(hfID.Value); } Disicipline objDiv = new Disicipline(lngID.ToString(), txttitel.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (chkInActive.Checked == true ? "Y" : "N")); MasMgr.InsertDisicipline(objDiv, hfIsUpadate.Value, IsDelete, (chkInActive.Checked == true ? "N" : "Y")); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { StringBuilder strSBUID = new StringBuilder(); MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpdate.Value == "N") { lngID = objDB.GerMaxIDNumber("OrientationTraining", "OriTrainingID"); } else { lngID = Convert.ToInt32(hfID.Value); } string strFirstDayOri = this.chkFDayOrien.Checked == true? "Y" : "N"; string strFirstDayOriDate = this.txtFDayOTDate.Text; string strAngChiSeftyPol = this.chkAnCSPori.Checked == true? "Y" : "N"; string strOT = this.chkOT.Checked == true? "Y" : "N"; string strOTDate = this.txtOTDate.Text; string strRemark = this.txtRemarks.Text; objTM.InsertOrientaTraining(lngID.ToString(), txtEmpID.Text.Trim(), strFirstDayOri, strFirstDayOriDate, strAngChiSeftyPol, strOT, strOTDate, strRemark, IsDelete, Session["USERID"].ToString(), hfIsUpdate.Value.ToString()); lblMsg.Text = Common.GetMessage(hfIsUpdate.Value.ToString(), IsDelete); //Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(txtEmpID.Text.Trim()); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpadate.Value == "N") { hfID.Value = Common.getMaxId("ProjectOfficeList", "ProjOfficeId"); } else { hfID.Value = hfID.Value; } Desigation objCnt = new Desigation(hfID.Value.ToString(), txtName.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (ChkIsActive.Checked == true ? "N" : "Y")); MasMgr.InsertProjectOffice(objCnt, hfIsUpadate.Value, IsDelete); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("SalaryHeadBlock", "TransId"); } else { lngID = Convert.ToInt32(hfID.Value); } MasMgr.InsertSalaryHeadBlock(lngID.ToString(), ddlSupervisor.SelectedValue.Trim(), ddlSalHead.SelectedValue.Trim(), txtFromDate.Text.Trim(), txtToDate.Text.Trim(), txtBlockAmt.Text.Trim(), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), hfIsUpadate.Value, IsDelete); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); Desigation objCnt = new Desigation(lngID.ToString(), "", "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", "Y"); MasMgr.UpdateProfessionalDegree(grprofessional, Session["USERID"].ToString()); lblMsg.Text = "Record Updated Successfully"; Common.EmptyTextBoxValues(this); //this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } // clsCommonSetup objCommonSetup = new clsCommonSetup(hfId.Value.ToString(), txtName.Text.Trim(), (chkInActive.Checked == true ? "N" : "Y"), "N", // Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete); // objEmpMgr.InsertDegree(objCommonSetup, hfIsUpdate.Value, IsDelete); // lblMsg.Text = "Record Updated Successfully"; // Common.EmptyTextBoxValues(this); // this.EntryMode(false); // this.OpenRecord(); //} //catch (Exception ex) //{ // lblMsg.Text = ""; // throw (ex); //} }
private void SendEmail() { MasterTablesManager MasMgr = new MasterTablesManager(); MailManagerSmtpClient objMail = new MailManagerSmtpClient(); DataTable dt = MasMgr.GetEmailNotification(); string strRetText = ""; string strToAddr = dt.Rows[0]["Verify"].ToString().Trim(); string strSubject = "Salary of " + ddlMonth.SelectedItem.ToString().Trim() + " has been waiting for your verification"; string strBody = "Hi,<br />The salary has been prepared by HR. Please verify and forword to Dir finance & Admin."; string strFromAddr = Session["EMAILID"].ToString().Trim(); strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, ""); if (strRetText == "Y") { lblMsg.Text = lblMsg.Text + "Email has been sent to Verify by Finance."; } else { lblMsg.Text = lblMsg.Text + "Email sending failed."; } }
private void SaveData() { try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpdate.Value == "Y") { hfId.Value = hfId.Value; } else { hfId.Value = Common.getMaxId("EmpTempDutyAssignLog", "DutyAssignID"); } string strStartDate = ""; string strEndDate = ""; if (string.IsNullOrEmpty(txtStartDate.Text.Trim()) == false) { strStartDate = Common.ReturnDate(txtStartDate.Text.Trim()); } if (string.IsNullOrEmpty(txtEndDate.Text.Trim()) == false) { strEndDate = Common.ReturnDate(txtEndDate.Text.Trim()); } clsTempDutyAssign objclsTempDutyAssign = new clsTempDutyAssign ( hfId.Value.ToString(), txtEmpID.Text.Trim(), ddlAction.SelectedValue.ToString(), ddlCompany.SelectedValue.ToString(), ddlClinic.SelectedValue.ToString(), ddlProject.SelectedValue.ToString(), ddlDept.SelectedValue.ToString(), ddlSubDept.SelectedValue.ToString(), txtAssignment.Text.Trim(), strStartDate, strEndDate, txtPercentage.Text.Trim(), txtAmount.Text.Trim(), txtSupervisorId.Text.Trim(), txtSupervisorComments.Text.Trim(), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()) ); objEmpInfoMgr.InsertEmpTempDuty(objclsTempDutyAssign, hfIsUpdate.Value); if (hfIsUpdate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else if (hfIsUpdate.Value == "Y") { lblMsg.Text = "Record Updated Successfully"; } else { lblMsg.Text = "Record Deleted Successfully"; } this.EntryMode(false); this.ClearControls(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("ProjectList", "ProjectId"); } else { lngID = Convert.ToInt32(hfID.Value); } clsProject objPrj = new clsProject(lngID.ToString(), txtProject.Text.Trim(), txtSName.Text.Trim(), txtProjectCode.Text.Trim(), Common.ReturnDate(txtStartDate.Text.ToString()), Common.ReturnDate(txtEndDate.Text.ToString()), //ddlWeekend.SelectedItem.Value.ToString(), //ddlIncrement.SelectedItem.Value.ToString(), //ddlIncrMonth.SelectedItem.Value.ToString(), //txtIncrementYear.Text.ToString(), (chkPF.Checked == true ? "Y" : "N"), (chkGratuity.Checked == true ? "Y" : "N"), //(chkEOC.Checked == true ? "Y" : "N"), //(chkEL.Checked == true ? "Y" : "N"), //(chkInsurance.Checked == true ? "Y" : "N"), //(chkGrossSalary.Checked == true ? "Y" : "N"), //(chkBasicSalary.Checked == true ? "Y" : "N"), //(chkCore.Checked == true ? "Y" : "N"), //(chkProject.Checked == true ? "Y" : "N"), (ChkIsActive.Checked == true ? "N" : "Y"), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "RDRS" ); MasMgr.InsertUpProject(objPrj, hfIsUpadate.Value, IsDelete); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { try { MasterTablesManager MasMgr = new MasterTablesManager(); clsEmpInfo objEmpInfo = new clsEmpInfo( txtEmpID.Text.ToString(), ddlTitle.SelectedValue.ToString(), txtFullName.Text.Trim(), txtFirstName.Text.Trim(), txtMiddleName.Text.Trim(), txtLastName.Text.Trim(), txtFatherName.Text.Trim(), txtMotherName.Text.Trim(), txtPreAddress.Text.Trim(), txtPrePhone.Text.Trim(), txtPreFax.Text.Trim(), txtPerAddress.Text.Trim(), txtPerPhone.Text.Trim(), txtPerFax.Text.Trim(), ddlPerDistrict.SelectedValue.ToString(), ddlPerCountry.SelectedValue.ToString(), ddlGender.SelectedValue.ToString(), txtDob.Text.Trim(), ddlReligion.SelectedValue.ToString(), ddlBloodGroup.SelectedValue.ToString(), ddlMaritalStatus.SelectedValue.ToString(), txtMarriageDate.Text.Trim(), txtNationality.Text.Trim(), txtNationalId.Text.Trim(), txtDOBId.Text.Trim(), txtTINNo.Text.Trim(), txtCircle.Text.Trim(), txtZone.Text.Trim(), txtPassportNo.Text.Trim(), txtPassExpDate.Text.Trim(), txtPasportIssOff.Text.Trim(), txtSkypeID.Text.Trim(), txtOffPhExt.Text.Trim(), txtOfficeEmail.Text.Trim(), txtCellPhone.Text.Trim(), txtLandPhone.Text.Trim(), txtPersonalEmail.Text.Trim(), ddlHighestEdu.SelectedValue.ToString(), ddlProffDegree.SelectedValue.ToString(), ddlSpecialSkill.SelectedValue.ToString(), chkIsRelativeSC.Checked == true ? "Y" : "N", ddlRelation.SelectedValue.ToString(), //chkIsSpectacled.Checked == true ? "Y" : "N", txtLicenseNo.Text.Trim(), txtLicenseExpDate.Text.Trim(), hfEmpImage.Value.ToString(), txtRelativeInfo.Text.Trim(), ddlNature.SelectedValue.ToString(), ddlPerDivision.SelectedValue.Trim(), ddlPerUpazila.SelectedValue.Trim(), ddlPerPS.SelectedValue.Trim(), ddlPreDivision.SelectedValue.Trim(), ddlPreDistrict.SelectedValue.Trim(), ddlPreUpzilla.SelectedValue.Trim(), ddlPrePS.SelectedValue.Trim(), ddlSubject.SelectedValue.ToString(), txtSSMMrNo.Text.Trim(), txtSpouseName.Text.Trim(), txtOldEmpID.Text.Trim() ); // Upload Employee Image if (hfIsUpadate.Value == "N") { this.UploadImage(); } else { if (FileUpload1.HasFile && FileUpload1.PostedFile != null) { this.UploadImage(); } else if (!string.IsNullOrEmpty(Session["imgByte"].ToString())) { imgByte = (byte[])Session["imgByte"]; } } // Upload Employee Signature Image if (hfIsUpadate.Value == "N") { this.UploadSignImage(); } else { if (FileUpload2.HasFile && FileUpload2.PostedFile != null) { this.UploadSignImage(); } else if (!string.IsNullOrEmpty(Session["imgSignByte"].ToString())) { imgSignByte = (byte[])Session["imgSignByte"]; } } objEmpInfoMgr.InsertEmpInfo(objEmpInfo, hfIsUpadate.Value, IsDelete, imgByte, imgSignByte); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }
private void SaveData(string IsDelete) { decimal decID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); if (hfIsUpdate.Value == "N") { decID = Convert.ToDecimal(Common.getMaxId("OfficeList", "OfficeID")); } else { decID = Convert.ToDecimal(hfID.Value); } List <DataTable> dtList = new List <DataTable>(); DataTable dtData = objDS.Tables["OfficeList"]; DataRow nRow = dtData.NewRow(); nRow["OfficeID"] = decID; nRow["OfficeTitle"] = txtOffTitle.Text.Trim(); nRow["OfficeTypeID"] = Common.RoundDecimal(ddlOffType.SelectedItem.Value.ToString(), 0); if (ddlParentOff.Items.Count != 0) { if (ddlParentOff.SelectedItem.Value.ToString() != "-1") { nRow["ParentID"] = Common.RoundDecimal(ddlParentOff.SelectedItem.Value.ToString(), 0); } } nRow["DivID"] = Common.RoundDecimal(ddlDivision.SelectedItem.Value.ToString(), 0); nRow["DistID"] = Common.RoundDecimal(ddlDistrict.SelectedItem.Value.ToString(), 0); nRow["UpzID"] = Common.RoundDecimal(ddlUpazila.SelectedItem.Value.ToString(), 0); nRow["IsActive"] = chkInActive.Checked == true ? 'N' : 'Y'; nRow["IsDeleted"] = "N"; nRow["IsPayLoc"] = chkIsPayroleLoc.Checked == true ? 'Y' : 'N'; if (hfIsUpdate.Value == "N") { nRow["InsertedBy"] = Session["USERID"].ToString(); nRow["InsertedDate"] = DateTime.Now; } else { nRow["UpdatedBy"] = Session["USERID"].ToString(); nRow["UpdatedDate"] = DateTime.Now; } dtData.Rows.Add(nRow); dtData.AcceptChanges(); dtList.Add(dtData); DataTable dtDataSalLoc = objDS.Tables["SalaryLocation"]; DataRow nRowSal = dtDataSalLoc.NewRow(); nRowSal["SalLocId"] = decID; nRowSal["SalLocName"] = txtOffTitle.Text.Trim(); nRowSal["DivisionID"] = Common.RoundDecimal(hfDivisionID.Value, 0); nRowSal["IsActive"] = chkInActive.Checked == true ? 'N' : 'Y'; nRowSal["IsDeleted"] = "Y"; nRowSal["InsertedBy"] = Session["USERID"].ToString(); nRowSal["InsertedDate"] = DateTime.Now; nRowSal["UpdatedBy"] = Session["USERID"].ToString(); nRowSal["UpdatedDate"] = DateTime.Now; nRowSal["LastUpdatedFrom"] = Session["USERID"].ToString(); if (chkIsPayroleLoc.Checked) { nRowSal["IsDeleted"] = "N"; } dtDataSalLoc.Rows.Add(nRowSal); dtDataSalLoc.AcceptChanges(); dtList.Add(dtDataSalLoc); objTMM.SaveOfficeData(dtList, hfIsUpdate.Value == "N" ? "I" : "U"); lblMsg.Text = Common.GetMessage(hfIsUpdate.Value == "N" ? "I" : "U"); this.EntryMode(false); this.OpenRecord(0, Convert.ToDecimal(ddlIntervention.SelectedValue.Trim()), Convert.ToDecimal(ddlOffTypeSearch.SelectedValue.Trim())); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }