protected void btnTextCodeSearch_Click(object sender, EventArgs e) { try { lbl_Message.Text = ""; if (this.txbTextCode.Text.Trim().Length > 0) { IDataManager textCodeEntityDataManager = RuntimeClassLoader.GetDataManager("DefaultMessages"); rslt = textCodeEntityDataManager.GetByCode(this.txbTextCode.Text); if (rslt.isSuccessful && rslt.dstResult.Tables[0].Rows.Count > 0) { this.txbHoldReason.Text = rslt.dstResult.Tables[0].Rows[0]["Description"].ToString(); } else { this.txbTextCode.Text = null; this.txbHoldReason.Text = null; // lbl_Message.Text = ApplicationMessages.RECORD_NOT_FOUND_MESSAGE; this.txbTextCode.Focus(); } } } catch (Exception ex) { lbl_Message.Text = ex.Message; //DataManager.SQLManager.LogException("HR_Transaction_CourierFeedback", "btnTextCodeSearch_Click", ex, Session["UserId"].ToString()); } }
protected void btnHoldReleasedraft_Click(object sender, EventArgs e) { try { lbl_Message.Text = ""; DraftDataManager DraftEntityDataManager = RuntimeClassLoader.GetDataManager("Draft") as DraftDataManager; if (this.btnHoldReleasedraft.Text == "Release Draft") { btnHoldReleasedraft.OnClientClick = "return confirm('Are you sure you want to Release the Draft?');"; //rslt = DraftEntityDataManager.MarkRelease((int)Session["RowId"]); rslt = DraftEntityDataManager.MarkRelease(Convert.ToInt32(Session["RowId"])); LOV_COLLECTION t = new LOV_COLLECTION(); DataSet ds; string remiaml = ""; string remisdn = ""; if (chbRemAMLDiscrepant.Checked == true) { remiaml = "1"; } else { remiaml = "0"; } if (chbRemSDNDiscrepant.Checked == true) { remisdn = "1"; } else { remisdn = "0"; } ds = t.RPS_SP_Remitter_UpdateSDNAML(Convert.ToInt32(Session["RowId"]), remiaml, remisdn); if (ds.Tables[0].Rows.Count > 0) { lbl_Message.Text = ApplicationMessages.UPDATE_SUCCESS_MESSAGE; this.btnHoldReleasedraft.Text = "Hold Draft"; btnHoldReleasedraft.OnClientClick = "return confirm('Are you sure you want to Hold the Draft?')"; this.txbHoldReason.ReadOnly = this.txbTextCode.ReadOnly = false; this.btnTextCodeLookup.Enabled = true; } else { lbl_Message.Text = ApplicationMessages.UPDATE_FAILURE_MESSAGE; } } else if (this.btnHoldReleasedraft.Text == "Hold Draft") { btnHoldReleasedraft.OnClientClick = "return confirm('Are you sure you want to Hold the Draft?')"; rslt = DraftEntityDataManager.MarkHold(Convert.ToInt32(Session["RowId"]), this.txbHoldReason.Text); LOV_COLLECTION rsltBeneficiary = new LOV_COLLECTION(); DataSet ds; string beniaml = ""; string benisdn = ""; if (chbBeneAMLDiscrepant.Checked == true) { beniaml = "1"; } else { beniaml = "0"; } if (chbBeneSDNDiscrepant.Checked == true) { benisdn = "1"; } else { benisdn = "0"; } //ds = rsltBeneficiary.RPS_SP_Beneficiary_UpdateSDNAML((int)Session["BeneficiaryId"], beniaml, benisdn); //Session["BeneficiaryId"] = "1821"; ds = rsltBeneficiary.RPS_SP_Beneficiary_UpdateSDNAML(Session["BeneficiaryId"].ToString(), beniaml, benisdn); //rsltBeneficiary = DraftEntityDataManager.MarkBeneficiarySDNAML((int)Session["BeneficiaryId"], chbBeneAMLDiscrepant.Checked,chbBeneSDNDiscrepant.Checked); //Session["RemitterId"] = "1821"; //rsltRemitter = DraftEntityDataManager.MarkRemitterSDNAML(Convert.ToInt32(Session["RemitterId"]), chbRemSDNDiscrepant.Checked, chbRemAMLDiscrepant.Checked); rsltRemitter = DraftEntityDataManager.MarkRemitterSDNAML(Convert.ToInt32(Session["RemitterId"]), (chbRemSDNDiscrepant.Checked == true) ? "0" : "1", (chbRemAMLDiscrepant.Checked == true) ? "0" : "1"); if (rslt.isSuccessful) { /* * if ((int)Session["RowId"] > 0 && Session["DraftNo"].ToString().Length > 0 && btnHoldReleasedraft.Text == "Hold Draft") * btnHoldReleasedraft.Attributes.Add("onclick", "wid=window.showModalDialog('../Transaction/MiscellaneousMsg.aspx?DraftId=" + Session["RowId"].ToString() + "&PriorityCode=601&DraftNo=" + Session["DraftNo"].ToString() + "&HoldReason=" + txbHoldReason.Text + "',null,'status:no;dialogWidth:1200px;dialogHeight:850px;dialogHide:true;help:no;scroll:yes');"); * else * { * btnHoldReleasedraft.Attributes.Remove("onclick"); * } */ lbl_Message.Text = ApplicationMessages.UPDATE_SUCCESS_MESSAGE; this.btnHoldReleasedraft.Text = "Release Draft"; this.txbHoldReason.ReadOnly = this.txbTextCode.ReadOnly = true; this.btnTextCodeLookup.Enabled = false; Response.Redirect("../MiscellaneousMessage/frmRPS_FreeTextMessageSPC.aspx?DraftId=" + Session["RowId"].ToString() + "&RI=987&PC=601&DraftNo=" + Session["DraftNo"].ToString() + "&TC=" + txbTextCode.Text + "&HoldReason=" + txbHoldReason.Text); } //else //lbl_Message.Text = ApplicationMessages.UPDATE_FAILURE_MESSAGE; } } catch (Exception ex) { lbl_Message.Text = ex.Message; //DataManager.SQLManager.LogException("HR_Transaction_CourierFeedback", "btnHoldReleaseDraft_Click", ex, Session["UserId"].ToString()); } }
protected void Page_Load(object sender, EventArgs e) { //ConnectionBean.ConnectionString = "Data Source=CR-ML150;Initial Catalog=samba_spds;User ID=sa;Password="******"UserId"] = Session["U_NAME"].ToString(); DraftEntity = RuntimeClassLoader.GetEntity(objectName) as DraftCommand; BeneficiaryEntity = RuntimeClassLoader.GetEntity("Beneficiary") as BeneficiaryCommand; RemmittanceEntity = RuntimeClassLoader.GetEntity("Remittance") as RemittanceCommand; RemmitterEntity = RuntimeClassLoader.GetEntity("Remitter") as RemitterCommand; PODEntity = RuntimeClassLoader.GetEntity("POD") as PODCommand; entityDataManager = RuntimeClassLoader.GetDataManager(objectName); draftdatamanager = RuntimeClassLoader.GetDataManager(objectName); Remittancedatamanager = RuntimeClassLoader.GetDataManager("Remittance"); Beneficiarydatamanager = RuntimeClassLoader.GetDataManager("Beneficiary"); Remitterdatamanager = RuntimeClassLoader.GetDataManager("Remitter"); poddatamanager = RuntimeClassLoader.GetDataManager("POD"); if (!IsPostBack) { Session["RowId"] = 0; Session["DraftNo"] = ""; this.btnHoldReleasedraft.Enabled = true; //btnTextCodeLookup.Attributes.Add("onclick", "wid=window.showModalDialog('../LOV/ListOfRecord.aspx?DataManager=DefaultMessages&Id=0&Entity=" + "" + "&Text=Text Code List&Values="+""+"&ListType=LookupList', 'CS', 'left=250,top=165,height=400, width= 500 ,menubar=no,location=no,toolbar=no,scrollbars=yes,resizable=no');"); txbDraftCurrency.Attributes.Add("style", "text-align: right;"); this.btnTextCodeSearch.Attributes.Add("style", "visibility: hidden;"); txbTextCode.Attributes.Add("onchange", "return SearchTextCode();"); //-----------This two lines create error--------- //rslt = (entityDataManager as DraftDataManager).GetAllHolded(); //Session["DataSource"] = rslt.dstResult.Tables[0]; //btnHolded.Attributes.Add("onclick", "wid=window.showModalDialog('../LOV/ListOfRecord.aspx?DataManager=Draft&Id=0&Entity=" + "" + "&Text=Draft List&Values=" + "" + "&ListType=SetupList&IsDataSource=1', 'CS', 'left=250,top=165,height=400, width= 500 ,menubar=no,location=no,toolbar=no,scrollbars=yes,resizable=no');"); Session["GetAll"] = "HoldReleaseDraft"; //btnReleased.Attributes.Add("onclick", "wid=window.showModalDialog('../LOV/ListOfRecord.aspx?DataManager=Draft&Id=0&Entity=" + "" + "&Text=Draft List&Values=" + "" + "&ListType=SpecificList', 'CS', 'left=250,top=165,height=400, width= 500 ,menubar=no,location=no,toolbar=no,scrollbars=yes,resizable=no');"); //((ScriptManager)Master.FindControl("ScriptManager1")).SetFocus(txbTextCode); Session["drv"] = ""; Session["drw"] = ""; } /* * if ((int)Session["RowId"] > 0 && Session["DraftNo"].ToString().Length > 0 && btnHoldReleasedraft.Text == "Hold Draft") * btnHoldReleasedraft.Attributes.Add("onclick", "wid=window.showModalDialog('../Transaction/MiscellaneousMsg.aspx?DraftId=" + Session["RowId"].ToString() + "&PriorityCode=601&DraftNo=" + Session["DraftNo"].ToString() + "&HoldReason=" + txbHoldReason.Text + "',null,'status:no;dialogWidth:1200px;dialogHeight:850px;dialogHide:true;help:no;scroll:yes');"); * else * { * btnHoldReleasedraft.Attributes.Remove("onclick"); * }*/ } catch (Exception ex) { lbl_Message.Text = ex.Message; // DataManager.SQLManager.LogException("HR_Transaction_CourierFeedback", "Page_Load", ex, Session["UserId"].ToString()); } }