public override global::System.Data.DataSet Clone() { DsForReport cln = ((DsForReport)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { DsForReport ds = new DsForReport(); 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); }
private void BestSellerReportForm_Load(object sender, EventArgs e) { connection(); DsForReport dsBestSeller = new DsForReport(); SqlCommand BestSellerCmd = new SqlCommand(query, consql); BestSellerCmd.CommandType = CommandType.Text; SqlDataAdapter DabestSeller = new SqlDataAdapter(BestSellerCmd); DabestSeller.Fill(dsBestSeller, "BESTSELLREPORT"); ReportDocument BestSellerDocument = new ReportDocument(); BestSellerDocument.Load(CommonConstant.REPORT + "BestSellerRpt.rpt");//"BestSellerRpt.rpt"); BestSellerDocument.SetDataSource(dsBestSeller); BestSellercrystalReportViewer.ReportSource = BestSellerDocument; BestSellercrystalReportViewer.Refresh(); }
private void PublisherReportForm_Load(object sender, EventArgs e) { connection(); String strPublisher = "SELECT P.PUB_NAME,P.PUB_PHONE,P.PUB_EMAIL,A.ADDRESS,A.CITY,A.STATE FROM PUBLISHER P INNER JOIN ADDRESS A ON A.ADD_ID = P.ADD_ID"; DsForReport dsPublisher = new DsForReport(); SqlCommand PublisherCmd = new SqlCommand(strPublisher, consql); PublisherCmd.CommandType = CommandType.Text; SqlDataAdapter DaPublisher = new SqlDataAdapter(PublisherCmd); DaPublisher.Fill(dsPublisher, "PUBREPORT"); ReportDocument PublisherDocument = new ReportDocument(); PublisherDocument.Load(CommonConstant.REPORT + "PublisherReport.rpt"); PublisherDocument.SetDataSource(dsPublisher); PublishercrystalReportViewer.ReportSource = PublisherDocument; PublishercrystalReportViewer.Refresh(); }
private void DamageLossReportForm_Load(object sender, EventArgs e) { connection(); String strdmglos = query; DsForReport dsdmglos = new DsForReport(); SqlCommand dmglosCmd = new SqlCommand(strdmglos, consql); dmglosCmd.CommandType = CommandType.Text; SqlDataAdapter Dadmglos = new SqlDataAdapter(dmglosCmd); Dadmglos.Fill(dsdmglos, "DAMAGEREPORT"); ReportDocument dmglosDocument = new ReportDocument(); dmglosDocument.Load(CommonConstant.REPORT + file);//"BookReport.rpt"); dmglosDocument.SetDataSource(dsdmglos); dmgLoscrystalReportViewer.ReportSource = dmglosDocument; dmgLoscrystalReportViewer.Refresh(); }
private void StockReportForm_Load(object sender, EventArgs e) { connection(); String strStock = "SELECT B.BK_TITLE,P.PUB_NAME,A.AUT_NAME,C.CAT_NAME,S.BOOK_QTY FROM STOCK S INNER JOIN BOOK B ON S.BOOK_ID = B.BOOK_ID INNER JOIN PUBLISHER P ON B.PUB_ID = P.PUB_ID INNER JOIN CATEGORY C ON C.CAT_ID = B.CAT_ID INNER JOIN AUTHOR A ON B.AUT_ID = A.AUT_ID"; DsForReport dsStock = new DsForReport(); SqlCommand StockCmd = new SqlCommand(strStock, consql); StockCmd.CommandType = CommandType.Text; SqlDataAdapter DaStock = new SqlDataAdapter(StockCmd); DaStock.Fill(dsStock, "STOCKREPORT"); ReportDocument StockDocument = new ReportDocument(); StockDocument.Load(CommonConstant.REPORT + "StockReport.rpt"); StockDocument.SetDataSource(dsStock); StockcrystalReportViewer.ReportSource = StockDocument; StockcrystalReportViewer.Refresh(); }
private void SaleReportForm_Load(object sender, EventArgs e) { connection(); String strSale = "SELECT B.BK_TITLE,A.AUT_NAME,C.CAT_NAME,P.PUB_NAME,SD.DISCOUNT_RATE, SUM(SD.SALE_QTY) AS SALE_QTY,SUM(SD.AMOUNT) AS AMOUNT FROM BOOK B INNER JOIN SALE_DETAIL SD ON SD.BOOK_ID=B.BOOK_ID INNER JOIN AUTHOR A ON A.AUT_ID = B.AUT_ID INNER JOIN CATEGORY C ON C.CAT_ID = B.CAT_ID INNER JOIN PUBLISHER P ON P.PUB_ID = B.PUB_ID GROUP BY B.BOOK_ID, B.BK_TITLE,A.AUT_NAME,C.CAT_NAME,P.PUB_NAME,SD.DISCOUNT_RATE ORDER BY SD.DISCOUNT_RATE DESC"; DsForReport dsSale = new DsForReport(); SqlCommand SaleCmd = new SqlCommand(strSale, consql); SaleCmd.CommandType = CommandType.Text; SqlDataAdapter DaSale = new SqlDataAdapter(SaleCmd); DaSale.Fill(dsSale, "SALEREPORT"); ReportDocument SaleDocument = new ReportDocument(); SaleDocument.Load(CommonConstant.REPORT + "SaleReport.rpt"); SaleDocument.SetDataSource(dsSale); SalecrystalReportViewer.ReportSource = SaleDocument; SalecrystalReportViewer.Refresh(); }
private void PurOrderReportForm_Load(object sender, EventArgs e) { connection(); String strPurOrder = query; DsForReport dsPurOrder = new DsForReport(); SqlCommand PurOrderCmd = new SqlCommand(strPurOrder, consql); PurOrderCmd.CommandType = CommandType.Text; SqlDataAdapter DaSale = new SqlDataAdapter(PurOrderCmd); DaSale.Fill(dsPurOrder, "ORDERREPORT"); ReportDocument purOrderDocument = new ReportDocument(); purOrderDocument.Load(CommonConstant.REPORT + file); purOrderDocument.SetDataSource(dsPurOrder); purordercrystalReportViewer.ReportSource = purOrderDocument; purordercrystalReportViewer.Refresh(); }
private void BookReportForm_Load(object sender, EventArgs e) { connection(); String strBook = query; DsForReport dsBook = new DsForReport(); SqlCommand BookCmd = new SqlCommand(strBook, consql); BookCmd.CommandType = CommandType.Text; SqlDataAdapter Dabook = new SqlDataAdapter(BookCmd); Dabook.Fill(dsBook, "BOOKREPORT"); ReportDocument bookDocument = new ReportDocument(); bookDocument.Load(CommonConstant.REPORT + file);//"BookReport.rpt"); bookDocument.SetDataSource(dsBook); BookcrystalReportViewer.ReportSource = bookDocument; BookcrystalReportViewer.Refresh(); }
private void AuthorReportForm_Load(object sender, EventArgs e) { connection(); String strAuthor = "SELECT AUT_NAME,AUT_SUB_NAME,GENDER FROM AUTHOR"; DsForReport dsAuthor = new DsForReport(); SqlCommand AuthorCmd = new SqlCommand(strAuthor, consql); AuthorCmd.CommandType = CommandType.Text; SqlDataAdapter DaAuthor = new SqlDataAdapter(AuthorCmd); DaAuthor.Fill(dsAuthor, "AUTREPORT"); ReportDocument AutohrDocument = new ReportDocument(); AutohrDocument.Load(CommonConstant.REPORT + "AuthorReport.rpt"); AutohrDocument.SetDataSource(dsAuthor); AuthorcrystalReportViewer.ReportSource = AutohrDocument; AuthorcrystalReportViewer.Refresh(); }
private void CategoryReportForm_Load(object sender, EventArgs e) { connection(); String strCategory = "SELECT CAT_NAME FROM CATEGORY"; DsForReport dsCategory = new DsForReport(); SqlCommand CategoryCmd = new SqlCommand(strCategory, consql); CategoryCmd.CommandType = CommandType.Text; SqlDataAdapter DaCategory = new SqlDataAdapter(CategoryCmd); DaCategory.Fill(dsCategory, "CATREPORT"); ReportDocument CategoryDocument = new ReportDocument(); CategoryDocument.Load(CommonConstant.REPORT + "CategoryReport.rpt"); CategoryDocument.SetDataSource(dsCategory); CategorycrystalReportViewer.ReportSource = CategoryDocument; CategorycrystalReportViewer.Refresh(); }
private void StaffReportForm_Load(object sender, EventArgs e) { connection(); String strStaff = "SELECT S.STAFF_NAME,S.PHONE,S.STAFF_DOB,S.GENDER,S.NRC,A.ADDRESS,A.CITY,A.STATE FROM STAFF S INNER JOIN ADDRESS A ON S.ADD_ID = A.ADD_ID"; DsForReport dsStaff = new DsForReport(); SqlCommand staffCmd = new SqlCommand(strStaff, consql); staffCmd.CommandType = CommandType.Text; SqlDataAdapter Dastaff = new SqlDataAdapter(staffCmd); Dastaff.Fill(dsStaff, "STAFFREPORT"); ReportDocument staffDocument = new ReportDocument(); staffDocument.Load(CommonConstant.REPORT + "StaffReport.rpt"); staffDocument.SetDataSource(dsStaff); StaffcrystalReportViewer.ReportSource = staffDocument; StaffcrystalReportViewer.Refresh(); //StaffcrystalReportViewer }
private void VoucherForm_Load(object sender, EventArgs e) { connection(); String strVoucher = "SELECT B.BK_TITLE,S.SELL_PRICE,SA.SALE_QTY,SA.AMOUNT FROM SALE_DETAIL SA INNER JOIN BOOK B ON B.BOOK_ID = SA.BOOK_ID INNER JOIN STOCK S ON S.BOOK_ID = SA.BOOK_ID WHERE SA.SALE_ID = '" + saleID + "'"; DsForReport dsVoucher = new DsForReport(); dsVoucher.VOUCHER.Rows.Add(saleID, CommonConstant.CREATED_BY); SqlCommand VoucherCmd = new SqlCommand(strVoucher, consql); VoucherCmd.CommandType = CommandType.Text; SqlDataAdapter DaVoucher = new SqlDataAdapter(VoucherCmd); DaVoucher.Fill(dsVoucher, "VOUCHERDT"); ReportDocument VoucherDocument = new ReportDocument(); VoucherDocument.Load(CommonConstant.REPORT + "Voucher.rpt"); VoucherDocument.SetDataSource(dsVoucher); VouchercrystalReportViewer.ReportSource = VoucherDocument; VouchercrystalReportViewer.Refresh(); sale.Close(); }