public void SearchPurchaseMaster()
 {
     try
     {
         String            showBillTotal;
         clsPurchaseMaster objSearch = new clsPurchaseMaster();
         objSearch.Mode      = "SELECTALL";
         objSearch.CompanyID = cId;
         String FromDate = dtpFromDate.Value.ToString("dd/MM/yyyy");
         if (DateTime.Now.ToString("dd/MM/yyyy") != FromDate)
         {
             objSearch.FromDate = clsCommoan.GetDateInddMMYYYY(FromDate);
         }
         String ToDate = dtpToDate.Value.ToString("dd/MM/yyyy");
         if (DateTime.Now.ToString("dd/MM/yyyy") != ToDate)
         {
             objSearch.ToDate = clsCommoan.GetDateInddMMYYYY(ToDate);
         }
         objSearch.PurchaseMasterSupplierFKeyAddress = txtSupplierAddress.Text;
         objSearch.PurchaseMasterType             = cmbPurchaseType.Text;
         objSearch.PurchaseMasterSupplierFKeyName = txtSupplier.Text;
         var ds = objSearch.Report_PurchaseRegister();
         SetReportValue("SenseInventoryLogoUI.Reports.SensePurchaseRegisterReport.rdlc", "dsPrint", ds, "Sales Purchase Register Report", null, "");
         LoadReportData(String.Empty);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString(), "SearchPurchaseMaster", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
 public void SearchPurchaseMaster()
 {
     try
     {
         clsPurchaseMaster objSearch = new clsPurchaseMaster();
         objSearch.Mode      = "SELECTALL";
         objSearch.CompanyID = cId;
         String FromDate = dtpFromDate.Value.ToString("dd/MM/yyyy");
         if (DateTime.Now.ToString("dd/MM/yyyy") != FromDate)
         {
             objSearch.FromDate = clsCommoan.GetDateInddMMYYYY(FromDate);
         }
         String ToDate = dtpToDate.Value.ToString("dd/MM/yyyy");
         if (DateTime.Now.ToString("dd/MM/yyyy") != ToDate)
         {
             objSearch.ToDate = clsCommoan.GetDateInddMMYYYY(ToDate);
         }
         objSearch.PurchaseMasterSupplierFKeyName    = txtSupplierName.Text;
         objSearch.PurchaseMasterSupplierFKeyAddress = txtSupplierAddress.Text;
         objSearch.PurchaseMasterType = cmbPurchaseType.Text;
         var ds = objSearch.SearchPurchaseMaster();
         dgvPurchaseView.AutoGenerateColumns = false;
         dgvPurchaseView.DataSource          = ds.Tables[0];
         lblRecordCount.Text = ds.Tables[0].Rows.Count.ToString();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString(), "SearchPurchaseMaster", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #3
0
 public void SearchPurchaseMaster()
 {
     try
     {
         clsPurchaseMaster objSearch = new clsPurchaseMaster();
         objSearch.Mode = "SELECTALL";
         String showBillTotal;
         objSearch.CompanyID = cId;
         String FromDate = dtpFromDate.Value.ToString("dd/MM/yyyy");
         if (DateTime.Now.ToString("dd/MM/yyyy") != FromDate)
         {
             objSearch.FromDate = clsCommoan.GetDateInddMMYYYY(FromDate);
         }
         String ToDate = dtpToDate.Value.ToString("dd/MM/yyyy");
         if (DateTime.Now.ToString("dd/MM/yyyy") != ToDate)
         {
             objSearch.ToDate = clsCommoan.GetDateInddMMYYYY(ToDate);
         }
         objSearch.PurchaseMasterSupplierFKeyAddress = txtSupplierAddress.Text;
         int isAvaibleinListItem = cmbSupplier.FindStringExact(cmbSupplier.Text);
         if (isAvaibleinListItem.Equals(-1))
         {
             objSearch.PurchaseMasterSupplierFKey = 0;
         }
         else
         {
             objSearch.PurchaseMasterSupplierFKey = Convert.ToInt32(cmbSupplier.SelectedValue);
         }
         if (objSearch.PurchaseMasterSupplierFKey.Equals(0))
         {
             showBillTotal = "No";
         }
         else
         {
             showBillTotal = "Yes";
         }
         var ds = objSearch.SearchPurchaseMasterItemPurchasePaymentReport();
         SetReportValue("SenseInventoryLogoUI.Reports.SenseInventoryPurchasePaymentReport.rdlc", "dsPrint", ds, "Star Purchase Item and Payment Report", null, "");
         LoadReportData(showBillTotal);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString(), "SearchPurchaseMaster", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }