protected void ddlCDDenom_SelectedIndexChanged(object sender, EventArgs e) { ddlCDCertif.Items.Clear(); if (!string.IsNullOrEmpty(ddlCDDenom.SelectedValue)) { Lien oLien = (Lien)Session[Constants.SES_LIEN_MARK]; DDListUtil.Add(ddlCDCertif, "", ""); //Filtered by Denomination List <Scrip> filteredScripList = oLien.Issue.ScripList.Where(s => s.Denomination.DenominationID.ToString().Equals(ddlCDDenom.SelectedValue)).ToList(); for (int iScripCount = 0; iScripCount < filteredScripList.Count; iScripCount++) { DDListUtil.Add(ddlCDCertif, filteredScripList[iScripCount].SPSeries + " " + filteredScripList[iScripCount].SlNo, filteredScripList[iScripCount].SPScripID.ToString() + ":" + filteredScripList[iScripCount].OlsStatus.ToString()); } } }
private void InitializeData() { gvData.DataSource = null; gvData.DataBind(); // Dropdown load SPType DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true); DDListUtil.LoadDDLFromXML(ddlDuration, "DateDuration", "Type", "Duration", false); ddlDuration.Enabled = false; txtStatementDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); txtDateFrom.ReadOnly = true; txtTotalFaceValue.Text = "0.00"; // year for (int i = 1995; i < DateTime.Now.Year + 1 + 1; i++) { DDListUtil.Add(ddlYear, i.ToString(), i.ToString()); } DDListUtil.Assign(ddlYear, DateTime.Now.Year); }
protected void ddlCDDenom_SelectedIndexChanged(object sender, EventArgs e) { ddlCDCertif.Items.Clear(); if (!string.IsNullOrEmpty(ddlCDDenom.SelectedValue)) { LienRemove oLienRemove = (LienRemove)Session[Constants.SES_LIEN_REMOVE_MARK]; DDListUtil.Add(ddlCDCertif, "", ""); if ((!string.IsNullOrEmpty(oLienRemove.LienRemoveTransNo) && oLienRemove.DtLienRemoveDetail.Rows.Count > 0) || string.IsNullOrEmpty(oLienRemove.LienRemoveTransNo)) { //Filtered by Denomination List <Scrip> filteredScripList = oLienRemove.Issue.ScripList.Where(s => s.Denomination.DenominationID.ToString().Equals(ddlCDDenom.SelectedValue)).ToList(); for (int iScripCount = 0; iScripCount < filteredScripList.Count; iScripCount++) { DDListUtil.Add(ddlCDCertif, filteredScripList[iScripCount].SPSeries + " " + filteredScripList[iScripCount].SlNo, filteredScripList[iScripCount].SPScripID.ToString()); } } } }
private void InitializeData() { gvData.DataSource = null; gvData.DataBind(); // Dropdown load SPType DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true); DDListUtil.LoadDDLFromXML(ddlDuration, "DateDuration", "Type", "Duration", false); ddlDuration.Enabled = false; txtStatementDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); // year for (int i = 1995; i < DateTime.Now.Year + 1 + 1; i++) { DDListUtil.Add(ddlYear, i.ToString(), i.ToString()); } txtDateFrom.ReadOnly = true; DDListUtil.Assign(ddlYear, DateTime.Now.Year); ClaimDAL claimDAL = new ClaimDAL(); //Store BASE_CURRENCY ViewState[_BASE_CUREENCY] = claimDAL.GetBaseCurrencyID(); }
private void InitializeData() { gvData.DataSource = null; gvData.DataBind(); // Dropdown load SPType DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true); // year for (int i = 1995; i < DateTime.Now.Year + 1 + 1; i++) { DDListUtil.Add(ddlYear, i.ToString(), i.ToString()); } ddlYear.Text = DateTime.Now.Year.ToString(); //Set ToDate txtClaimDate.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtPaymentDateFrom.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtPaymentDateTo.Text = DateTime.Now.ToString("dd/MM/yyyy"); ClaimDAL claimDAL = new ClaimDAL(); //Store BASE_CURRENCY ViewState[_BASE_CUREENCY] = claimDAL.GetBaseCurrencyID(); }
private void InitializeData() { gvIntClaimDetail.PageSize = (int)Constants.PAGING_UNAPPROVED; gvClaim.DataSource = null; gvClaim.DataBind(); gvIntClaimDetail.DataSource = null; gvIntClaimDetail.DataBind(); // Dropdown load SPType DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true); // year for (int i = 1995; i < DateTime.Today.Year + 1; i++) { DDListUtil.Add(ddlYear, i.ToString(), i.ToString()); } DDListUtil.Assign(ddlYear, DateTime.Now.Year); //Initial Value Set txtReconciliationDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); txtReimConvRate.Text = "1.0000"; txtCovRateToBC.Text = "1.00"; string sRefNo = Request.QueryString[OBJ_REF_NO]; string sPageID = Request.QueryString[OBJ_PAGE_ID]; if (!string.IsNullOrEmpty(sRefNo)) { sRefNo = oCrypManager.GetDecryptedString(sRefNo, Constants.CRYPT_PASSWORD_STRING); } if (!string.IsNullOrEmpty(sPageID)) { sPageID = oCrypManager.GetDecryptedString(sPageID, Constants.CRYPT_PASSWORD_STRING); } if (!string.IsNullOrEmpty(sRefNo) && !string.IsNullOrEmpty(sPageID)) { string sOperationType = sPageID.Substring(4, 1); if (Constants.OPERATION_TYPE_APPROVAL.Equals(sOperationType)) { Config oConfig = (Config)Session[Constants.SES_USER_CONFIG]; SEARCH_FROM = 2; LoadDataByReferenceNo(sRefNo, "1");//query from Temp Table #region User-Detail. UserDetails oUserDetails = ucUserDet.UserDetail; oUserDetails.CheckerID = oConfig.UserName; oUserDetails.CheckDate = DateTime.Now; ucUserDet.UserDetail = oUserDetails; #endregion User-Detail. fsList.Visible = false; EnableDisableControl(true); } } else { Config oConfig = (Config)Session[Constants.SES_USER_CONFIG]; UserDetails oUserDetails = new UserDetails(); oUserDetails.MakerID = oConfig.UserName; oUserDetails.MakeDate = DateTime.Now; ucUserDet.UserDetail = oUserDetails; fsList.Visible = true; LoadPreviousList(); EnableDisableControl(false); } }
private void ClearAfterApprove() { // Lien Mark set in session Session[Constants.SES_LIEN_MARK] = null; gvCertInfo.DataSource = null; gvCertInfo.DataBind(); gvCustomerDetail.DataSource = null; gvCustomerDetail.DataBind(); gvNomDetail.DataSource = null; gvNomDetail.DataBind(); hdLienTransNo.Value = ""; hdIssueTransNo.Value = ""; hdRegNo.Value = ""; //Issue Details.. year if (ddlYear.Items.Count > 0) { ddlYear.SelectedIndex = 0; } else { for (int i = 1990; i < DateTime.Now.Year + 1 + 1; i++) { DDListUtil.Add(ddlYear, i.ToString(), i.ToString()); } ddlYear.SelectedIndex = 0; } txtTotalAmount.Text = string.Empty; txtIssueName.Text = string.Empty; ddlCustomerType.Items.Clear(); if (ddlSpType.Items.Count > 0) { ddlSpType.SelectedIndex = 0; } if (ddlBranch.Items.Count > 0) { ddlBranch.SelectedIndex = 0; } txtLienTransNo.Text = string.Empty; txtIssueDate.Text = string.Empty; txtRegNo.Text = string.Empty; txtLienDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); // Lien Detail txtRemarks.Text = string.Empty; txtOurRefNo.Text = string.Empty; txtTheirRefNo.Text = string.Empty; txtTotalAmount.Text = string.Empty; txtLienBank.Text = string.Empty; txtBankAddress.Text = string.Empty; //Certificate Detail ddlCDDenom.Items.Clear(); ddlCDCertif.Items.Clear(); txtCDUpTo.Text = "1"; txtCDTotalAmount.Text = string.Empty; ucUserDet.Reset(); ucUserDet.ResetData(); }
private void SetObject(Lien oLien) { if (oLien != null) { if (oLien.Issue != null) { hdLienTransNo.Value = oLien.LienTransNo; hdIssueTransNo.Value = oLien.Issue.IssueTransNo; hdRegNo.Value = oLien.Issue.RegNo; //Lien Detail txtRegNo.Text = oLien.Issue.RegNo; txtLienTransNo.Text = oLien.LienTransNo; txtIssueDate.Text = oLien.Issue.VersionIssueDate.ToString(Constants.DATETIME_FORMAT); //txtLienDate.Text = oLien.LienDate.ToString(Constants.DATETIME_FORMAT); txtLienDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); txtRemarks.Text = oLien.Remarks; txtOurRefNo.Text = oLien.OurRef; txtTheirRefNo.Text = oLien.TheirRef; txtLienBank.Text = oLien.LienBank; txtBankAddress.Text = oLien.LienBankAddress; txtTotalAmount.Text = oLien.Issue.IssueAmount.ToString(); txtIssueName.Text = oLien.Issue.IssueName.ToString(); ddlSpType.Text = oLien.Issue.SPType.SPTypeID.Trim(); ddlBranch.Text = oLien.Issue.Branch.BranchID.Trim(); //ddlCustomerType.Text = oLien.Issue.CustomerType.CustomerTypeID.Trim(); DDListUtil.Assign(ddlCustomerType, oLien.Issue.VersionSPPolicy.DTCustomerTypePolicy, true); DDListUtil.Assign(ddlCustomerType, oLien.Issue.CustomerType.CustomerTypeID); ddlYear.Text = DateTime.Now.Year.ToString(); #region Customer Details DataTable dtCustomerDetails = new DataTable(); dtCustomerDetails.Columns.Add(new DataColumn("Customer Name", typeof(string))); //dtCustomerDetails.Columns.Add(new DataColumn("Customer ID", typeof(string))); dtCustomerDetails.Columns.Add(new DataColumn("Address", typeof(string))); dtCustomerDetails.Columns.Add(new DataColumn("Phone", typeof(string))); DataRow rowCustomerDetails = null; for (int customerCount = 0; customerCount < oLien.Issue.CustomerDetailsList.Count; customerCount++) { rowCustomerDetails = dtCustomerDetails.NewRow(); rowCustomerDetails["Customer Name"] = oLien.Issue.CustomerDetailsList[customerCount].CustomerName; //rowCustomerDetails["Customer ID"] = oLien.Issue.CustomerDetailsList[customerCount].CustomerID; rowCustomerDetails["Address"] = oLien.Issue.CustomerDetailsList[customerCount].Address; dtCustomerDetails.Rows.Add(rowCustomerDetails); } gvCustomerDetail.DataSource = dtCustomerDetails; gvCustomerDetail.DataBind(); #endregion #region Nominee Detail DataTable dtNomineeDetail = new DataTable(); dtNomineeDetail.Columns.Add(new DataColumn("Nominee Name", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Relation", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Address", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Nominee Share", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Amount", typeof(string))); DataRow rowNomineeDetail = null; for (int nomineeCount = 0; nomineeCount < oLien.Issue.NomineeList.Count; nomineeCount++) { rowNomineeDetail = dtNomineeDetail.NewRow(); rowNomineeDetail["Nominee Name"] = oLien.Issue.NomineeList[nomineeCount].NomineeName; rowNomineeDetail["Relation"] = oLien.Issue.NomineeList[nomineeCount].Relation; rowNomineeDetail["Address"] = oLien.Issue.NomineeList[nomineeCount].Address; rowNomineeDetail["Nominee Share"] = oLien.Issue.NomineeList[nomineeCount].NomineeShare; dtNomineeDetail.Rows.Add(rowNomineeDetail); } gvNomDetail.DataSource = dtNomineeDetail; gvNomDetail.DataBind(); #endregion #region Certificate Detail // Certificate Detail ArrayList alScrip = new ArrayList(); ddlCDDenom.Items.Clear(); DDListUtil.Add(ddlCDDenom, "", ""); for (int iScripCount = 0; iScripCount < oLien.Issue.ScripList.Count; iScripCount++) { if (!alScrip.Contains(oLien.Issue.ScripList[iScripCount].Denomination.DenominationID)) { DDListUtil.Add(ddlCDDenom, oLien.Issue.ScripList[iScripCount].Denomination.DenominationID.ToString(), oLien.Issue.ScripList[iScripCount].Denomination.DenominationID.ToString()); alScrip.Add(oLien.Issue.ScripList[iScripCount].Denomination.DenominationID); } } DataTable dtLienDetails = oLien.DtLienDetails.Copy(); if (dtLienDetails.Columns.Contains("OldStatus")) { dtLienDetails.Columns.Remove("OldStatus"); } if (dtLienDetails.Columns.Contains("SPScripID")) { dtLienDetails.Columns.Remove("SPScripID"); } gvCertInfo.DataSource = dtLienDetails; gvCertInfo.DataBind(); for (int i = 0; i < gvCertInfo.Rows.Count; i++) { HiddenField hdObj = (HiddenField)gvCertInfo.Rows[i].FindControl("hdOldStatus"); if (hdObj != null) { hdObj.Value = oLien.DtLienDetails.Rows[i]["OldStatus"].ToString(); } } #endregion Session[Constants.SES_LIEN_MARK] = oLien; // user detail UserDetails oUserDetails = ucUserDet.UserDetail; if (hdDataType.Value.Equals("2")) { oUserDetails.MakerID = oLien.UserDetails.MakerID; oUserDetails.MakeDate = oLien.UserDetails.MakeDate; oUserDetails.CheckerID = oLien.UserDetails.CheckerID; oUserDetails.CheckDate = oLien.UserDetails.CheckDate; oUserDetails.CheckerComment = oLien.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; txtLienDate.Text = oLien.LienDate.ToString(Constants.DATETIME_FORMAT); } else if (SEARCH_FROM.Equals(3)) { oUserDetails.MakerID = oLien.UserDetails.MakerID; oUserDetails.CheckerComment = oLien.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } else { oUserDetails.CheckerID = oLien.UserDetails.CheckerID; oUserDetails.CheckDate = oLien.UserDetails.CheckDate; oUserDetails.CheckerComment = oLien.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } } } }
private void SetObject(StopPaymentRemove oStopPayRemove) { if (oStopPayRemove != null) { if (oStopPayRemove.Issue != null) { hdStopPayRemoveTransNo.Value = oStopPayRemove.StopPaymentRemoveTransNo; hdIssueTransNo.Value = oStopPayRemove.Issue.IssueTransNo; hdRegNo.Value = oStopPayRemove.Issue.RegNo; txtRegNo.Text = oStopPayRemove.Issue.RegNo.ToString(); ddlSpType.Text = oStopPayRemove.Issue.SPType.SPTypeID.Trim(); ddlBranch.Text = oStopPayRemove.Issue.Branch.BranchID.Trim(); txtIssueName.Text = oStopPayRemove.Issue.IssueName; //Loading from StopPayment Search if (oStopPayRemove.StopPaymentRemoveDate.Year.Equals(1) || oStopPayRemove.StopPaymentRemoveDate.Year.Equals(1900)) { txtRemoveDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); } else //Loading from StopPaymentRemove Search { txtRemoveDate.Text = oStopPayRemove.StopPaymentRemoveDate.ToString(Constants.DATETIME_FORMAT); } txtStopPayRemoveTransNo.Text = oStopPayRemove.StopPaymentRemoveTransNo.ToString(); //Issue Details DDListUtil.Assign(ddlSpType, oStopPayRemove.Issue.SPType.SPTypeID); DDListUtil.Assign(ddlBranch, oStopPayRemove.Issue.Branch.BranchID); txtRegNo.Text = oStopPayRemove.Issue.RegNo; txtIssueDate.Text = oStopPayRemove.Issue.VersionIssueDate.ToString(Constants.DATETIME_FORMAT); txtStopDate.Text = oStopPayRemove.StopPayment.StopPaymentDate.ToString(Constants.DATETIME_FORMAT); txtStopAmount.Text = oStopPayRemove.StopPayment.StopPaymentAmount.ToString("N2"); txtStopTransNo.Text = oStopPayRemove.StopPayment.StopPaymentTransNo; DDListUtil.Assign(ddlCustomerType, oStopPayRemove.Issue.VersionSPPolicy.DTCustomerTypePolicy, true); DDListUtil.Assign(ddlCustomerType, oStopPayRemove.Issue.CustomerType.CustomerTypeID); // Remarks txtStopRemarks.Text = oStopPayRemove.StopPayment.Remarks; txtRemoveRemarks.Text = oStopPayRemove.Remarks; #region Customer Details DataTable dtCustomerDetails = new DataTable(); dtCustomerDetails.Columns.Add(new DataColumn("Customer Name", typeof(string))); //dtCustomerDetails.Columns.Add(new DataColumn("Customer ID", typeof(string))); dtCustomerDetails.Columns.Add(new DataColumn("Address", typeof(string))); dtCustomerDetails.Columns.Add(new DataColumn("Phone", typeof(string))); DataRow rowCustomerDetails = null; for (int customerCount = 0; customerCount < oStopPayRemove.Issue.CustomerDetailsList.Count; customerCount++) { rowCustomerDetails = dtCustomerDetails.NewRow(); rowCustomerDetails["Customer Name"] = oStopPayRemove.Issue.CustomerDetailsList[customerCount].CustomerName; //rowCustomerDetails["Customer ID"] = oStopPayRemove.Issue.CustomerDetailsList[customerCount].CustomerID; rowCustomerDetails["Address"] = oStopPayRemove.Issue.CustomerDetailsList[customerCount].Address; rowCustomerDetails["Phone"] = oStopPayRemove.Issue.CustomerDetailsList[customerCount].Phone; dtCustomerDetails.Rows.Add(rowCustomerDetails); } gvCustomerDetail.DataSource = dtCustomerDetails; gvCustomerDetail.DataBind(); #endregion #region Nominee Detail DataTable dtNomineeDetail = new DataTable(); dtNomineeDetail.Columns.Add(new DataColumn("Nominee Name", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Relation", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Address", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Nominee Share", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Amount", typeof(string))); DataRow rowNomineeDetail = null; for (int nomineeCount = 0; nomineeCount < oStopPayRemove.Issue.NomineeList.Count; nomineeCount++) { rowNomineeDetail = dtNomineeDetail.NewRow(); rowNomineeDetail["Nominee Name"] = oStopPayRemove.Issue.NomineeList[nomineeCount].NomineeName; rowNomineeDetail["Relation"] = oStopPayRemove.Issue.NomineeList[nomineeCount].Relation; rowNomineeDetail["Address"] = oStopPayRemove.Issue.NomineeList[nomineeCount].Address; rowNomineeDetail["Nominee Share"] = oStopPayRemove.Issue.NomineeList[nomineeCount].NomineeShare; rowNomineeDetail["Amount"] = oStopPayRemove.Issue.NomineeList[nomineeCount].Amount; dtNomineeDetail.Rows.Add(rowNomineeDetail); } gvNomDetail.DataSource = dtNomineeDetail; gvNomDetail.DataBind(); #endregion #region Certificate Detail ArrayList alScrip = new ArrayList(); ddlCDDenom.Items.Clear(); DDListUtil.Add(ddlCDDenom, "", ""); if (!(hdDataType.Value.Equals("2") && hdButtonType.Value.Equals("D"))) { for (int iScripCount = 0; iScripCount < oStopPayRemove.Issue.ScripList.Count; iScripCount++) { if (!alScrip.Contains(oStopPayRemove.Issue.ScripList[iScripCount].Denomination.DenominationID)) { DDListUtil.Add(ddlCDDenom, oStopPayRemove.Issue.ScripList[iScripCount].Denomination.DenominationID.ToString(), oStopPayRemove.Issue.ScripList[iScripCount].Denomination.DenominationID.ToString()); alScrip.Add(oStopPayRemove.Issue.ScripList[iScripCount].Denomination.DenominationID); } } } #endregion Certificate Detail // Certificate Detail txtCDTotalAmount.Text = oStopPayRemove.StopPaymentRemoveAmount.ToString("N2"); DataTable dtTmp = oStopPayRemove.DtStopPayRemoveDetail; if (dtTmp.Columns.Contains("SPScripID")) { dtTmp.Columns.Remove("SPScripID"); } gvCertInfo.DataSource = dtTmp; gvCertInfo.DataBind(); #region Set User Details Session[Constants.SES_STOPPAY_REMOVE_MARK] = oStopPayRemove; UserDetails oUserDetails = ucUserDet.UserDetail; //Prompt message if already Stop Mark Removed if ((SEARCH_FROM.Equals(1)) && hdDataType.Value.Equals("2") && ddlCDDenom.Items.Count <= 1) { ucMessage.OpenMessage("Stop Mark removed!!", Constants.MSG_TYPE_INFO); ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true); } else if (hdButtonType.Value.Equals("S")) //Stop Payment Approve search { if (ddlCDDenom.Items.Count <= 1) { ucMessage.OpenMessage("Stop Mark removed!!", Constants.MSG_TYPE_INFO); ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true); } } else if (hdDataType.Value.Equals("2") && hdButtonType.Value.Equals("D")) //StopPaymentRemove Approve search { oUserDetails.MakerID = oStopPayRemove.UserDetails.MakerID; oUserDetails.MakeDate = oStopPayRemove.UserDetails.MakeDate; oUserDetails.CheckerID = oStopPayRemove.UserDetails.CheckerID; oUserDetails.CheckDate = oStopPayRemove.UserDetails.CheckDate; oUserDetails.CheckerComment = oStopPayRemove.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; txtRemoveDate.Text = oStopPayRemove.StopPaymentRemoveDate.ToString(Constants.DATETIME_FORMAT); } else if ((hdDataType.Value.Equals("1") && SEARCH_FROM.Equals(1)) || (SEARCH_FROM.Equals(2) && hdDataType.Value.Equals("1"))) { oUserDetails.CheckerID = oStopPayRemove.UserDetails.CheckerID; oUserDetails.CheckDate = oStopPayRemove.UserDetails.CheckDate; oUserDetails.CheckerComment = oStopPayRemove.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } else if (SEARCH_FROM.Equals(3)) // Coming from Approval page { oUserDetails.MakerID = oStopPayRemove.UserDetails.MakerID; oUserDetails.CheckerComment = oStopPayRemove.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } #endregion Calculate(""); } } }
private void InitializeData() { string sRegID = Request.QueryString[OBJ_REG_NO]; string sPageID = Request.QueryString[OBJ_PAGE_ID]; string sIsUpdate = Request.QueryString[OBJ_IS_UPDATE]; if (!string.IsNullOrEmpty(sRegID)) { sRegID = oCrypManager.GetDecryptedString(sRegID, Constants.CRYPT_PASSWORD_STRING); } if (!string.IsNullOrEmpty(sPageID)) { sPageID = oCrypManager.GetDecryptedString(sPageID, Constants.CRYPT_PASSWORD_STRING); } if (!string.IsNullOrEmpty(sIsUpdate)) { sIsUpdate = oCrypManager.GetDecryptedString(sIsUpdate, Constants.CRYPT_PASSWORD_STRING); } Config oConfig = (Config)Session[Constants.SES_USER_CONFIG]; // common portion to Enabled or not // Dropdown load SPType DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true); DDListUtil.LoadDDLFromDB(ddlBranch, "BranchID", "BranchName", "SPMS_Branch", true); gvNomDetail.DataSource = null; gvNomDetail.DataBind(); gvCustomerDetail.DataSource = null; gvCustomerDetail.DataBind(); // year for (int i = 1990; i < 2020; i++) { DDListUtil.Add(ddlYear, i.ToString(), i.ToString()); } if (!string.IsNullOrEmpty(sRegID) && !string.IsNullOrEmpty(sPageID) && sIsUpdate.Equals("0")) { string sOperationType = sPageID.Substring(4, 1); if (Constants.OPERATION_TYPE_APPROVAL.Equals(sOperationType)) { // come from approve page.. LoadDataByRegNo(string.Empty, sRegID, "1"); EnableDisableControl(true); divOldNominee.Visible = true; // user detail Util.ControlEnabled(ucUserDet.FindControl("txtCheckerComments"), true); #region User-Detail. UserDetails oUserDetails = ucUserDet.UserDetail; oUserDetails.CheckerID = oConfig.UserName; oUserDetails.CheckDate = DateTime.Now; ucUserDet.UserDetail = oUserDetails; #endregion User-Detail. } } else { fsList.Visible = true; LoadUnapprovedList(); // come from View page.. if (!string.IsNullOrEmpty(sIsUpdate) && sIsUpdate.Equals("1")) { LoadDataByRegNo(string.Empty, sRegID, "1"); divOldNominee.Visible = false; } if (oConfig != null) { UserDetails oUserDetails = new UserDetails(); oUserDetails.MakerID = oConfig.UserName; oUserDetails.MakeDate = DateTime.Now; ucUserDet.UserDetail = oUserDetails; } EnableDisableControl(false); } }
private void TotalClear() { // Stop Payment Mark set in session EnableDisableControl(false); StopPayment oStopPayment = new StopPayment(); if (Session[Constants.SES_STOPPAY_MARK] == null) { Session.Add(Constants.SES_STOPPAY_MARK, oStopPayment); } else { Session[Constants.SES_STOPPAY_MARK] = oStopPayment; } gvCertInfo.DataSource = null; gvCertInfo.DataBind(); gvCustomerDetail.DataSource = null; gvCustomerDetail.DataBind(); gvNomDetail.DataSource = null; gvNomDetail.DataBind(); hdStopPayTransNo.Value = ""; hdIssueTransNo.Value = ""; hdRegNo.Value = ""; //Stop Payment Mark Transaction No txtStopPaymentDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); txtStopPayTransNo.Text = string.Empty; //Issue Details.. year if (ddlYear.Items.Count > 0) { ddlYear.Text = DateTime.Now.Year.ToString(); } else { for (int i = 1990; i < DateTime.Now.Year + 1 + 1; i++) { DDListUtil.Add(ddlYear, i.ToString(), i.ToString()); } ddlYear.Text = DateTime.Now.Year.ToString(); } txtTotalAmount.Text = string.Empty; ddlCustomerType.Items.Clear(); if (ddlSpType.Items.Count > 0) { ddlSpType.SelectedIndex = 0; } if (ddlBranch.Items.Count > 0) { ddlBranch.SelectedIndex = 0; } txtIssueDate.Text = string.Empty; txtIssueName.Text = string.Empty; txtRegNo.Text = string.Empty; // Remarks txtRemarks.Text = string.Empty; //Certificate Detail ddlCDDenom.Items.Clear(); ddlCDCertif.Items.Clear(); txtCDUpTo.Text = "1"; txtCDTotalAmount.Text = string.Empty; ucUserDet.Reset(); ucUserDet.ResetData(); }
private void SetObject(StopPayment oStopPay) { if (oStopPay != null) { if (oStopPay.Issue != null) { hdStopPayTransNo.Value = oStopPay.StopPaymentTransNo; hdIssueTransNo.Value = oStopPay.Issue.IssueTransNo; hdRegNo.Value = oStopPay.Issue.RegNo; txtRegNo.Text = oStopPay.Issue.RegNo.ToString(); ddlSpType.Text = oStopPay.Issue.SPType.SPTypeID.Trim(); ddlBranch.Text = oStopPay.Issue.Branch.BranchID.Trim(); txtStopPaymentDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); txtStopPayTransNo.Text = oStopPay.StopPaymentTransNo; txtIssueName.Text = oStopPay.Issue.IssueName; //Issue Details DDListUtil.Assign(ddlSpType, oStopPay.Issue.SPType.SPTypeID); DDListUtil.Assign(ddlYear, oStopPay.Issue.VersionIssueDate.Year); DDListUtil.Assign(ddlBranch, oStopPay.Issue.Branch.BranchID); txtRegNo.Text = oStopPay.Issue.RegNo; txtIssueDate.Text = oStopPay.Issue.VersionIssueDate.ToString(Constants.DATETIME_FORMAT); txtTotalAmount.Text = oStopPay.Issue.IssueAmount.ToString("N2"); DDListUtil.Assign(ddlCustomerType, oStopPay.Issue.VersionSPPolicy.DTCustomerTypePolicy, true); DDListUtil.Assign(ddlCustomerType, oStopPay.Issue.CustomerType.CustomerTypeID); #region Customer Details DataTable dtCustomerDetails = new DataTable(); dtCustomerDetails.Columns.Add(new DataColumn("Customer Name", typeof(string))); //dtCustomerDetails.Columns.Add(new DataColumn("Customer ID", typeof(string))); dtCustomerDetails.Columns.Add(new DataColumn("Address", typeof(string))); dtCustomerDetails.Columns.Add(new DataColumn("Phone", typeof(string))); DataRow rowCustomerDetails = null; for (int customerCount = 0; customerCount < oStopPay.Issue.CustomerDetailsList.Count; customerCount++) { rowCustomerDetails = dtCustomerDetails.NewRow(); rowCustomerDetails["Customer Name"] = oStopPay.Issue.CustomerDetailsList[customerCount].CustomerName; //rowCustomerDetails["Customer ID"] = oStopPay.Issue.CustomerDetailsList[customerCount].CustomerID; rowCustomerDetails["Address"] = oStopPay.Issue.CustomerDetailsList[customerCount].Address; rowCustomerDetails["Phone"] = oStopPay.Issue.CustomerDetailsList[customerCount].Phone; dtCustomerDetails.Rows.Add(rowCustomerDetails); } gvCustomerDetail.DataSource = dtCustomerDetails; gvCustomerDetail.DataBind(); #endregion #region Nominee Detail DataTable dtNomineeDetail = new DataTable(); dtNomineeDetail.Columns.Add(new DataColumn("Nominee Name", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Relation", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Address", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Nominee Share", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Amount", typeof(string))); DataRow rowNomineeDetail = null; for (int nomineeCount = 0; nomineeCount < oStopPay.Issue.NomineeList.Count; nomineeCount++) { rowNomineeDetail = dtNomineeDetail.NewRow(); rowNomineeDetail["Nominee Name"] = oStopPay.Issue.NomineeList[nomineeCount].NomineeName; rowNomineeDetail["Relation"] = oStopPay.Issue.NomineeList[nomineeCount].Relation; rowNomineeDetail["Address"] = oStopPay.Issue.NomineeList[nomineeCount].Address; rowNomineeDetail["Nominee Share"] = oStopPay.Issue.NomineeList[nomineeCount].NomineeShare; rowNomineeDetail["Amount"] = oStopPay.Issue.NomineeList[nomineeCount].Amount; dtNomineeDetail.Rows.Add(rowNomineeDetail); } gvNomDetail.DataSource = dtNomineeDetail; gvNomDetail.DataBind(); #endregion ArrayList alScrip = new ArrayList(); ddlCDDenom.Items.Clear(); DDListUtil.Add(ddlCDDenom, "", ""); for (int iScripCount = 0; iScripCount < oStopPay.Issue.ScripList.Count; iScripCount++) { if (!alScrip.Contains(oStopPay.Issue.ScripList[iScripCount].Denomination.DenominationID)) { DDListUtil.Add(ddlCDDenom, oStopPay.Issue.ScripList[iScripCount].Denomination.DenominationID.ToString(), oStopPay.Issue.ScripList[iScripCount].Denomination.DenominationID.ToString()); alScrip.Add(oStopPay.Issue.ScripList[iScripCount].Denomination.DenominationID); } } // remarks txtRemarks.Text = oStopPay.Remarks; // Certificate Detail DataTable dtStopPayment = oStopPay.DtStopPaymentDetail.Copy(); if (dtStopPayment.Columns.Contains("OldStatus")) { dtStopPayment.Columns.Remove("OldStatus"); } if (dtStopPayment.Columns.Contains("SPScripID")) { dtStopPayment.Columns.Remove("SPScripID"); } gvCertInfo.DataSource = dtStopPayment; gvCertInfo.DataBind(); for (int i = 0; i < gvCertInfo.Rows.Count; i++) { HiddenField hdObj = (HiddenField)gvCertInfo.Rows[i].FindControl("hdOldStatus"); if (hdObj != null) { hdObj.Value = oStopPay.DtStopPaymentDetail.Rows[i]["OldStatus"].ToString(); } } Session[Constants.SES_STOPPAY_MARK] = oStopPay; // user detail UserDetails oUserDetails = ucUserDet.UserDetail; if (hdDataType.Value.Equals("2") && SEARCH_FROM.Equals(1)) { oUserDetails.MakerID = oStopPay.UserDetails.MakerID; oUserDetails.MakeDate = oStopPay.UserDetails.MakeDate; oUserDetails.CheckerID = oStopPay.UserDetails.CheckerID; oUserDetails.CheckDate = oStopPay.UserDetails.CheckDate; oUserDetails.CheckerComment = oStopPay.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; txtStopPaymentDate.Text = oStopPay.StopPaymentDate.ToString(Constants.DATETIME_FORMAT); } if ((hdDataType.Value.Equals("1") && SEARCH_FROM.Equals(1)) || SEARCH_FROM.Equals(2)) { oUserDetails.CheckerID = oStopPay.UserDetails.CheckerID; oUserDetails.CheckDate = oStopPay.UserDetails.CheckDate; oUserDetails.CheckerComment = oStopPay.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } if (SEARCH_FROM.Equals(3)) { oUserDetails.MakerID = oStopPay.UserDetails.MakerID; oUserDetails.CheckerComment = oStopPay.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } if (oStopPay.Issue.Status.Equals((int)Constants.ISSUE_STATUS.FULL_ENCAHSED)) { ucMessage.OpenMessage("Already Encashed.", Constants.MSG_TYPE_INFO); ScriptManager.RegisterStartupScript(this.UpdatePanel8, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true); } Calculate(""); } } }
private void SetObject(LienRemove oLienRemove) { if (oLienRemove != null) { if (oLienRemove.Issue != null) { hdLienRemoveTransNo.Value = oLienRemove.LienRemoveTransNo; hdIssueTransNo.Value = oLienRemove.Issue.IssueTransNo; hdRegNo.Value = oLienRemove.Issue.RegNo; //Lien Detail txtLienDate.Text = oLienRemove.Lien.LienDate.ToString(Constants.DATETIME_FORMAT); txtLienTransNo.Text = oLienRemove.Lien.LienTransNo; txtLienAmount.Text = oLienRemove.Lien.LienAmount.ToString(); //Load from LienMark search if (oLienRemove.LienRemoveDate.Year.Equals(1) || oLienRemove.LienRemoveDate.Year.Equals(1900)) { txtUnlienDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT); } else //Load from LienMark Remove search { txtUnlienDate.Text = oLienRemove.LienRemoveDate.ToString(Constants.DATETIME_FORMAT); } txtOurRefNo.Text = oLienRemove.OurRef; txtTheirRefNo.Text = oLienRemove.TheirRef; if (!string.IsNullOrEmpty(oLienRemove.LienBank)) { txtLienBank.Text = oLienRemove.LienBank; } else { txtLienBank.Text = oLienRemove.Lien.LienBank; } if (!string.IsNullOrEmpty(oLienRemove.LienBankAddress)) { txtBankAddress.Text = oLienRemove.LienBankAddress; } else { txtBankAddress.Text = oLienRemove.Lien.LienBankAddress; } // Remarks txtRemarks.Text = oLienRemove.Remarks; //Issue Details txtRegNo.Text = oLienRemove.Issue.RegNo.ToString(); txtIssueDate.Text = oLienRemove.Issue.VersionIssueDate.ToString(Constants.DATETIME_FORMAT); txtIssueName.Text = oLienRemove.Issue.IssueName.ToString(); ddlSpType.Text = oLienRemove.Issue.SPType.SPTypeID.Trim(); ddlBranch.Text = oLienRemove.Issue.Branch.BranchID.Trim(); DDListUtil.Assign(ddlCustomerType, oLienRemove.Issue.VersionSPPolicy.DTCustomerTypePolicy, true); DDListUtil.Assign(ddlCustomerType, oLienRemove.Issue.CustomerType.CustomerTypeID); // User Info // ucUserDet.UserDetail = oLienRemove.UserDetails; #region Customer Details DataTable dtCustomerDetails = new DataTable(); dtCustomerDetails.Columns.Add(new DataColumn("Customer Name", typeof(string))); //dtCustomerDetails.Columns.Add(new DataColumn("Customer ID", typeof(string))); dtCustomerDetails.Columns.Add(new DataColumn("Address", typeof(string))); DataRow rowCustomerDetails = null; for (int customerCount = 0; customerCount < oLienRemove.Issue.CustomerDetailsList.Count; customerCount++) { rowCustomerDetails = dtCustomerDetails.NewRow(); rowCustomerDetails["Customer Name"] = oLienRemove.Issue.CustomerDetailsList[customerCount].CustomerName; //rowCustomerDetails["Customer ID"] = oLienRemove.Issue.CustomerDetailsList[customerCount].CustomerID; rowCustomerDetails["Address"] = oLienRemove.Issue.CustomerDetailsList[customerCount].Address; dtCustomerDetails.Rows.Add(rowCustomerDetails); } gvCustomerDetail.DataSource = dtCustomerDetails; gvCustomerDetail.DataBind(); #endregion #region Nominee Detail DataTable dtNomineeDetail = new DataTable(); dtNomineeDetail.Columns.Add(new DataColumn("Nominee Name", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Relation", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Address", typeof(string))); dtNomineeDetail.Columns.Add(new DataColumn("Nominee Share", typeof(string))); DataRow rowNomineeDetail = null; for (int nomineeCount = 0; nomineeCount < oLienRemove.Issue.NomineeList.Count; nomineeCount++) { rowNomineeDetail = dtNomineeDetail.NewRow(); rowNomineeDetail["Nominee Name"] = oLienRemove.Issue.NomineeList[nomineeCount].NomineeName; rowNomineeDetail["Relation"] = oLienRemove.Issue.NomineeList[nomineeCount].Relation; rowNomineeDetail["Address"] = oLienRemove.Issue.NomineeList[nomineeCount].Address; rowNomineeDetail["Nominee Share"] = oLienRemove.Issue.NomineeList[nomineeCount].NomineeShare; dtNomineeDetail.Rows.Add(rowNomineeDetail); } gvNomDetail.DataSource = dtNomineeDetail; gvNomDetail.DataBind(); #endregion #region Certificate Detail ArrayList alScrip = new ArrayList(); ddlCDDenom.Items.Clear(); DDListUtil.Add(ddlCDDenom, "", ""); for (int iScripCount = 0; iScripCount < oLienRemove.Issue.ScripList.Count; iScripCount++) { if (!alScrip.Contains(oLienRemove.Issue.ScripList[iScripCount].Denomination.DenominationID)) { DDListUtil.Add(ddlCDDenom, oLienRemove.Issue.ScripList[iScripCount].Denomination.DenominationID.ToString(), oLienRemove.Issue.ScripList[iScripCount].Denomination.DenominationID.ToString()); alScrip.Add(oLienRemove.Issue.ScripList[iScripCount].Denomination.DenominationID); } } #endregion Certificate Detail // Certificate Detail txtCDRemoveAmount.Text = oLienRemove.LienRemoveAmount.ToString("N2"); DataTable tmpDt = oLienRemove.DtLienRemoveDetail.Copy(); if (tmpDt.Columns.Contains("SPScripID")) { tmpDt.Columns.Remove("SPScripID"); } gvCertInfo.DataSource = tmpDt; gvCertInfo.DataBind(); Session[Constants.SES_LIEN_REMOVE_MARK] = oLienRemove; if ((SEARCH_FROM.Equals(2)) && ddlCDDenom.Items.Count <= 1) { ucMessage.OpenMessage("Lien Mark removed!!", Constants.MSG_TYPE_INFO); ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true); } else { txtUnlienTransNo.Text = oLienRemove.LienRemoveTransNo; } // user detail UserDetails oUserDetails = ucUserDet.UserDetail; if (hdDataType.Value.Equals("2")) { oUserDetails.MakerID = oLienRemove.UserDetails.MakerID; oUserDetails.MakeDate = oLienRemove.UserDetails.MakeDate; oUserDetails.CheckerID = oLienRemove.UserDetails.CheckerID; oUserDetails.CheckDate = oLienRemove.UserDetails.CheckDate; oUserDetails.CheckerComment = oLienRemove.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } if (SEARCH_FROM.Equals(4)) { oUserDetails.MakerID = oLienRemove.UserDetails.MakerID; oUserDetails.CheckerComment = oLienRemove.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } else { oUserDetails.CheckerID = oLienRemove.UserDetails.CheckerID; oUserDetails.CheckDate = oLienRemove.UserDetails.CheckDate; oUserDetails.CheckerComment = oLienRemove.UserDetails.CheckerComment; ucUserDet.UserDetail = oUserDetails; } } } }