private void btnPrintStockSheet_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var printForm = new WindowPrint <stp_gnt_earth_selResult, stp_gnt_earth_selResult>(new gnt_rpt_creditor_stock_back());
         printForm.articleList = new List <stp_gnt_earth_selResult>();
         printForm.articleList.Add(selectedRecord);
         printForm.ShowDialog();
     }
     catch (Exception exception)
     {
         Messages.ErrorMessage(exception.Message);
     }
 }
Ejemplo n.º 2
0
 private void btnPrint_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var printForm = new WindowPrint <stp_gnt_water_selResult, stp_gnt_ownership_selResult>(new gnt_rpt_water_ownerships());
         printForm.articleList    = allRecords;
         printForm.selectedRecord = CurrentWater;
         printForm.ShowDialog();
     }
     catch (Exception exception)
     {
         Messages.ErrorMessage(exception.CompleteMessages());
     }
 }
Ejemplo n.º 3
0
 private static void ShowAllCreditorsReport(List <tbl_gnt_creditor> creditorsList)
 {
     try
     {
         var db        = DDB.NewContext();
         var printForm = new WindowPrint <tbl_gnt_settings, tbl_gnt_creditor>(new gnt_rpt_all_creditors());
         printForm.articleList    = creditorsList;
         printForm.selectedRecord = db.tbl_gnt_settings.First();
         printForm.AddCustomParameter("Title2", "لیست مشخصات کل سهامداران شرکت ");
         printForm.ShowDialog();
     }
     catch (Exception exception)
     {
         Messages.ErrorMessage(exception.CompleteMessages());
     }
 }
Ejemplo n.º 4
0
 private static void ShowDebtorsReport(List <tbl_gnt_creditor> creditorsList)
 {
     try
     {
         var db        = DDB.NewContext();
         var printForm = new WindowPrint <tbl_gnt_settings, tbl_gnt_creditor>(new gnt_rpt_creditor_debtors());
         printForm.articleList    = creditorsList;
         printForm.selectedRecord = db.tbl_gnt_settings.First();
         printForm.AddCustomParameter("Title2", "لیست مانده بدهی سهامداران شرکت در سال " + GlobalVariables.current_fiscal_year_name);
         printForm.ShowDialog();
     }
     catch (Exception exception)
     {
         Messages.ErrorMessage(exception.CompleteMessages());
     }
 }
Ejemplo n.º 5
0
 private void btnPrintCreditorsList_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         CalculateAccountForAllCreditors(false);
         CalculateEarthCountForAllCreditors(false);
         var printForm = new WindowPrint <tbl_gnt_creditor, stp_gnt_creditor_selResult>(new gnt_rpt_creditor_list());
         printForm.articleList    = allRecords;
         printForm.selectedRecord = null;
         printForm.ShowDialog();
     }
     catch (Exception exception)
     {
         Messages.ErrorMessage(exception.CompleteMessages());
     }
 }
 public override void PrintClick()
 {
     try
     {
         if (printReportFile == null)
         {
             return;
         }
         var printForm = new WindowPrint <tbl_gnt_creditor, stp_gnt_creditor_account_selResult>(printReportFile);
         printForm.articleList    = allRecords;
         printForm.selectedRecord = this.CurrentCreditor.ToEntity();
         printForm.ShowDialog();
     }
     catch (Exception exception)
     {
         Messages.ErrorMessage(exception.CompleteMessages());
     }
 }
Ejemplo n.º 7
0
 private void btnPrintStockSheet_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var db        = DDB.NewContext();
         var printForm = new WindowPrint <tbl_gnt_creditor, tbl_gnt_creditor>(new gnt_rpt_creditor_stock());
         var settings  = db.tbl_gnt_settings.FirstOrDefault();
         var creditor  = db.tbl_gnt_creditor.Where(x => x.gnt_creditor_id == selectedRecord.gnt_creditor_id).FirstOrDefault();
         creditor.gnt_creditor_birth_date = APMDateTime.dateWithSlash(creditor.gnt_creditor_birth_date);
         printForm.selectedRecord         = creditor;
         printForm.AddCustomParameter("chairman", settings.gnt_settings_chairman_name);
         printForm.AddCustomParameter("executive_manager", settings.gnt_settings_executive_manager_name);
         printForm.ShowDialog();
     }
     catch (Exception exception)
     {
         Messages.ErrorMessage(exception.Message);
     }
 }
Ejemplo n.º 8
0
        private static void ShowHelpsReport(List <tbl_gnt_creditor> creditorsList)
        {
            try
            {
                var db        = DDB.NewContext();
                var printForm = new WindowPrint <tbl_gnt_settings, tbl_gnt_creditor>(new gnt_rpt_creditor_helps());
                printForm.articleList = creditorsList;

                creditorsList.ForEach
                (
                    x =>
                {
                    if (x.gnt_creditor_mobile == null || x.gnt_creditor_mobile.Trim() == "")
                    {
                        x.gnt_creditor_mobile = x.gnt_creditor_tel;
                    }
                }
                );

                var setting = db.tbl_gnt_settings.First();
                printForm.selectedRecord = setting;
                int helpPrice = 0;
                if (setting.gnt_settings_help_price.HasValue)
                {
                    helpPrice = setting.gnt_settings_help_price.Value;
                }

                printForm.AddCustomParameter("price", helpPrice.DigitGrouping());
                printForm.AddCustomParameter("Title1", "سازمان جهاد کشاورزی استان اصفهان");
                printForm.AddCustomParameter("Title2", "مدیریت جهاد کشاورزی شهرستان نجف آباد");
                printForm.AddCustomParameter("Title3", "لیست پرداخت کمک های بلاعوض به خسارت دیدگان ناشی از خشکسالی سال");
                printForm.ShowDialog();
            }
            catch (Exception exception)
            {
                Messages.ErrorMessage(exception.CompleteMessages());
            }
        }
 private void PrintPayment_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (selectedRecord.gnt_creditor_account_credit == 0)
         {
             Messages.InformationMessage("لطفاً یک سطر پرداخت را انتخاب نمائید");
             return;
         }
         var    reportDocument = new gnt_rpt_creditor_payment();
         var    printForm      = new WindowPrint <tbl_gnt_creditor, stp_gnt_creditor_account_selResult>(reportDocument);
         string sentence       = string.Format("گواهی می شود سهامدار فوق مبلغ {0} ریال طی فیش شماره {1} بابت بدهی های زیر پرداخت نموده است.", selectedRecord.gnt_creditor_account_credit.DigitGrouping(), selectedRecord.gnt_creditor_payment_receipt_no);
         printForm.AddCustomParameter("payment_sentence", sentence);
         printForm.AddCustomParameter("payment_date", selectedRecord.gnt_creditor_account_date);
         printForm.articleList    = allRecords;
         printForm.selectedRecord = this.CurrentCreditor.ToEntity();
         printForm.ShowDialog();
     }
     catch (Exception exception)
     {
         Messages.ErrorMessage(exception.CompleteMessages());
     }
 }
        public override void PrintClick()
        {
            string address = "...";

            try
            {
                var db   = DDB.NewContext();
                var list = db.tbl_gnt_earth.Where(x => x.gnt_earth_gnt_creditor_id == CurrentCreditor.gnt_creditor_id);
                if (list.Count() > 0)
                {
                    var earth = list.First();
                    address = "خیابان {0} ، ردیف {1} ، بلوک {2} ، پلاک {3}".FormatWith(earth.gnt_earth_street, earth.gnt_earth_line, earth.gnt_earth_block, earth.gnt_earth_plaque);
                }
            }
            catch
            {
                address = "---";
            }
            var parameterForm = new frm_gnt_service_report_parameters(this.CurrentCreditor.gnt_creditor_name, address);

            if (parameterForm.ShowDialog() != true)
            {
                return;
            }
            var sentence = parameterForm.Sentence;

            var reportFile = new gnt_rpt_service();
            var printForm  = new WindowPrint <tbl_gnt_creditor, stp_gnt_service_article_selResult>(reportFile);

            printForm.articleList    = bindingListArticle.ToList();
            printForm.selectedRecord = this.CurrentCreditor.ToEntity();
            printForm.AddCustomParameter("gnt_service_code", selectedRecord.gnt_service_code);
            printForm.AddCustomParameter("gnt_service_date", selectedRecord.gnt_service_date);
            printForm.AddCustomParameter("below_sentence", sentence);
            printForm.ShowDialog();
        }