public override global::System.Data.DataSet Clone() { PaymentDataSet cln = ((PaymentDataSet)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { PaymentDataSet ds = new PaymentDataSet(); 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); }
public void selectPaymentprint(ref PaymentDataSet dataset, String SelectStatement) { try { command = new MySqlCommand(); command.Connection = SqlConnectionDB.connection; command.CommandText = SelectStatement; connection.Open(); MySqlDataAdapter adapter = new MySqlDataAdapter(command); adapter.Fill(dataset.DataTable1); //MessageBox.Show("Correct Selection"); connection.Close(); } catch (Exception e) { Console.WriteLine(e.Message); MessageBox.Show("لم يتم جلب البيانات\nتاكد من الاتصال بالانترنت"); connection.Close(); } }
private void print_Click_1(object sender, EventArgs e) { if (tab_container.SelectedTab == payments_tab) { PaymentDataSet data = new PaymentDataSet(); String payment_query = "SELECT pay_id as 'id', pay_price as 'price' " + ", (SELECT COALESCE(SUM(ch_price), 0)" + " FROM checks WHERE bill_id=payments.pay_id) as 'checks'" + ", pay_date as 'date' , pay_note as 'note' " + " FROM payments WHERE cust_id='" + Id + "'" + " AND pay_date BETWEEN '" + FormatDate(datefrom_pic.Value) + "'" + " AND '" + FormatDate(dateto_pic.Value) + "' ORDER BY pay_id DESC"; db.selectPaymentprint(ref data, payment_query); PaymentPrintForm report = new PaymentPrintForm(data, cust_label.Text, total_paid_label.Text); report.Show(); } else { if (MessageBox.Show("هل تريد الطباعه؟", "تاكيد الطباعه", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Finish(); CustBillDataSet data = new CustBillDataSet(); string teethe_query = "SELECT " + "COALESCE(GROUP_CONCAT(t.number SEPARATOR ','),'مثبت') " + "FROM teeth t WHERE t.bill_id=b.id"; string query = "SELECT b.id,bill_id,b.bill_teethes,b.bill_price" + ", b.bill_delv_state" + ",DATE_FORMAT(b.bill_delv_date,'%d %m %Y') as 'bill_delv_date'" + ", (" + teethe_query + ") as 'teeth' " + "FROM bill b WHERE b.cust_id='" + Id + "'" + " AND b.bill_rec_date BETWEEN '" + FormatDate(datefrom_pic.Value) + "'" + " AND '" + FormatDate(dateto_pic.Value) + "'"; db.selectDBprint(ref data, query); CustPrintForm report = new CustPrintForm(data, total.Text, cust_label.Text , total_paid_label.Text, sale_label.Text , final_total_label.Text, debt_label.Text); report.Show(); } } }
private void ReadPCPAYFILE(IACDataSet PCPAY) { PaymentDataSet IVR = new PaymentDataSet(); SQLBackupandRestore SQLBR = new SQLBackupandRestore(); IACDataSetTableAdapters.IVRPAYTableAdapter IVRPAYTableAdapter = new IACDataSetTableAdapters.IVRPAYTableAdapter(); IACDataSetTableAdapters.PAYMENTTableAdapter PAYMENTTableAdapter = new IACDataSetTableAdapters.PAYMENTTableAdapter(); PaymentDataSetTableAdapters.IVRRejectsTableAdapter IVRRejectsTableAdapter = new PaymentDataSetTableAdapters.IVRRejectsTableAdapter(); if (SQLBR.RunJob("IVRIMPORT", "Import from IVR", false)) { Thread.Sleep(5000); try { IVRPAYTableAdapter.Fill(PCPAY.IVRPAY); } catch { IVRPAYTableAdapter.Fill(PCPAY.IVRPAY); } } // Moses Newman 09/25/2018 Create Rejects Report if any customers are Inactive. if (PCPAY.IVRPAY.Rows.Count != 0) { IVRRejectsTableAdapter.Create(); IVRRejectsTableAdapter.FillByAll(IVR.IVRRejects); if (IVR.IVRRejects.Rows.Count > 0) { MDIIAC2013 MDImain = (MDIIAC2013)MdiParent; Hide(); MDImain.CreateFormInstance("ReportViewer", false); ReportViewer rptViewer = (ReportViewer)MDImain.ActiveMdiChild; IVRRejects myReportObject = new IVRRejects(); myReportObject.SetDataSource(IVR); myReportObject.SetParameterValue("gsUserID", Program.gsUserID); myReportObject.SetParameterValue("gsUserName", Program.gsUserName); myReportObject.SetParameterValue("gsTitle", "IVR PAYMENT REJECTS REPORT"); rptViewer.crystalReportViewer.ReportSource = myReportObject; rptViewer.crystalReportViewer.Refresh(); rptViewer.Show(); } } if (SQLBR.RunJob("IVRToPayment", "Move IVR to PAYMENT", false)) { Thread.Sleep(5000); try { PAYMENTTableAdapter.FillByAll(PCPAY.PAYMENT); } catch { PAYMENTTableAdapter.FillByAll(PCPAY.PAYMENT); } } PCPAY.IVRPAY.Clear(); IVRPAYTableAdapter.Dispose(); PAYMENTTableAdapter.Dispose(); PCPAY.Dispose(); }
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(); PaymentDataSet ds = new PaymentDataSet(); 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 = "DataTable1DataTable"; 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); }