private void btnManagePayment_Click(object sender, EventArgs e) { this.getForm1557DetailsData = this.form15110Control.WorkItem.GetFormDetails(Convert.ToInt32(1557), TerraScanCommon.UserId); if (this.getForm1557DetailsData.Rows.Count > 0) { this.form1557OpenPermission = Convert.ToBoolean(this.getForm1557DetailsData.Rows[0][getForm1557DetailsData.IsPermissionOpenColumn.ColumnName].ToString()); } Form form1557 = new Form(); this.receiptActionsData = this.form15110Control.WorkItem.F15110_GetReceiptActions(this.receiptId); object[] optionalParameter = new object[3]; optionalParameter[0] = this.receiptId; optionalParameter[1] = this.paidByUsername; optionalParameter[2] = this.paidbyUserId; form1557 = this.form15110Control.WorkItem.Services.Get <TerraScan.Infrastructure.Interface.Services.IFormEngineService>().GetForm(1557, optionalParameter, this.form15110Control.WorkItem); if (form1557 != null && this.form1557OpenPermission == true) { if (form1557.ShowDialog() == DialogResult.OK) { this.GetReceiptActions(); } } else { MessageBox.Show(SharedFunctions.GetResourceString("FormOpenPermission") + "ReverseReceipt Form", ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information); } if (this.receiptId > 0) { this.form15110Control.WorkItem.F1557_InsertRefundInterest(this.receiptId, TerraScanCommon.UserId); } }
public override global::System.Data.DataSet Clone() { F15110ReceiptActionsData cln = ((F15110ReceiptActionsData)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
/// <summary> /// Gets the Receipt actions details based on the ReceiptId /// </summary> /// <param name="receiptId">The ReceiptId.</param> /// <returns> /// The typed dataset containing the Receipt Actions information of the ReceiptId. /// </returns> public static F15110ReceiptActionsData F15110_GetReceiptActions(int receiptId) { F15110ReceiptActionsData receiptActionsData = new F15110ReceiptActionsData(); Hashtable ht = new Hashtable(); ht.Add("@ReceiptID", receiptId); Utility.LoadDataSet(receiptActionsData.GetReceiptAction, "f15110_pcget_ReceiptAction", ht); return(receiptActionsData); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { F15110ReceiptActionsData ds = new F15110ReceiptActionsData(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
/// <summary> /// Handles the Click event of the ReverseReceiptButton control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void ReverseReceiptButton_Click(object sender, EventArgs e) { try { this.getForm1555DetailsData = this.form15110Control.WorkItem.GetFormDetails(Convert.ToInt32(1555), TerraScanCommon.UserId); if (this.getForm1555DetailsData.Rows.Count > 0) { this.form1555OpenPermission = Convert.ToBoolean(this.getForm1555DetailsData.Rows[0][getForm1555DetailsData.IsPermissionOpenColumn.ColumnName].ToString()); } this.Cursor = Cursors.WaitCursor; Form form1555 = new Form(); this.receiptActionsData = this.form15110Control.WorkItem.F15110_GetReceiptActions(this.receiptId); object[] optionalParameter = new object[] { this.receiptId }; form1555 = this.form15110Control.WorkItem.Services.Get <TerraScan.Infrastructure.Interface.Services.IFormEngineService>().GetForm(1555, optionalParameter, this.form15110Control.WorkItem); if (form1555 != null && this.form1555OpenPermission == true) { if (form1555.ShowDialog() == DialogResult.OK) { this.GetReceiptActions(); } } else { MessageBox.Show(SharedFunctions.GetResourceString("FormOpenPermission") + "ReverseReceipt Form", ConfigurationWrapper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (SoapException ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); } catch (Exception ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); } finally { this.Cursor = Cursors.Default; } }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); F15110ReceiptActionsData ds = new F15110ReceiptActionsData(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "GetReceiptActionDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
/// <summary> /// Gets the receipt button actions and assign the color according to the revesal type /// </summary> private void GetReceiptActions() { this.receiptActionsData = this.form15110Control.WorkItem.F15110_GetReceiptActions(this.receiptId); this.reverseDatatableCount = this.receiptActionsData.GetReceiptAction.Rows.Count; if (this.reverseDatatableCount > 0) { receiptActions = (F15110ReceiptActionsData.GetReceiptActionRow) this.receiptActionsData.GetReceiptAction.Rows[0]; this.DisplayReverseLinkLable(receiptActions); if (!string.IsNullOrEmpty(receiptActions.AddInterestAction.ToString())) { if (receiptActions.AddInterestAction.Equals(1)) { this.AddIntrestPaidButton.BackColor = Color.FromArgb(28, 81, 128); } else if (receiptActions.AddInterestAction.Equals(2)) { this.AddIntrestPaidButton.BackColor = Color.FromArgb(128, 0, 0); } else if (receiptActions.AddInterestAction.Equals(3)) { this.AddIntrestPaidButton.BackColor = Color.FromArgb(152, 152, 152); } } if (receiptActions.ReceiptAction == (int)ReceiptActionTypes.ReverseReceipt) { this.EnableControls(receiptActions, true); } else if (receiptActions.ReceiptAction == (int)ReceiptActionTypes.ReversedReceipt) { this.EnableControls(receiptActions, false); } else if (receiptActions.ReceiptAction == (int)ReceiptActionTypes.ReversalReceipt) { this.EnableControls(receiptActions, false); } if (receiptActions.IsAddInterestButtonEnabled.Equals(1)) { this.AddIntrestPaidButton.Enabled = true; } else { this.AddIntrestPaidButton.Enabled = false; this.AddIntrestPaidButton.ForeColor = Color.LightGray; } if (receiptActions.IsManagePaymentButtonEnabled.Equals(1)) { this.btnManagePayment.Enabled = true; this.btnManagePayment.ForeColor = Color.White; this.btnManagePayment.BackColor = Color.FromArgb(28, 81, 128); } else { this.btnManagePayment.Enabled = false; this.btnManagePayment.ForeColor = Color.LightGray; this.btnManagePayment.BackColor = Color.FromArgb(152, 152, 152); } if (!string.IsNullOrEmpty(receiptActions.AddInterestText.ToString())) { this.AddIntrestPaidButton.Text = receiptActions.AddInterestText.ToString(); } } else { this.ReverseReceiptButton.StatusOnText = this.receiptAction; this.ReverseReceiptButton.StatusIndicator = true; this.ReverseReceiptLabel.Text = string.Empty; this.ReverseReceiptLinkLabel.Text = string.Empty; this.ReverseReceiptLinkLabel.FormId = 0; this.ReverseButtonPanel.Enabled = false; this.ReverseReceiptButton.Enabled = false; this.AddIntrestPaidButton.Enabled = false; this.btnManagePayment.Enabled = false; } }