Esempio n. 1
0
        public UFormNoResidentWithholdingTax(MBaseModel model, int page, int issue, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MAccountDoc(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;
            pageNo     = page;
            pageCount  = totalPage;
            pageParam  = param;
            rptConfig  = cfg;
            issueCout  = issue;

            init();

            MAccountDoc ad = (dataSource as MAccountDoc);

            numberTextAmount = ad.CashReceiptAmtFmt;

            primaryColumns.Clear();

            primaryColumns.Add(new GridLength(70, GridUnitType.Star));
            primaryColumns.Add(new GridLength(14, GridUnitType.Star));
            primaryColumns.Add(new GridLength(13, GridUnitType.Star));
            primaryColumns.Add(new GridLength(13, GridUnitType.Star));

            DataContext = model;
            InitializeComponent();
        }
Esempio n. 2
0
        public UFormQuotationComplex(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MAuxilaryDoc(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;
            pageNo     = page;
            pageCount  = totalPage;
            pageParam  = param;
            rptConfig  = cfg;

            init();

            MAuxilaryDoc ad = (dataSource as MAuxilaryDoc);

            numberTextAmount = ad.ArApAmtFmt;
            amountFmt        = ad.ArApAmtFmt;

            primaryColumns.Clear();

            primaryColumns.Add(new GridLength(10, GridUnitType.Star));
            primaryColumns.Add(new GridLength(60, GridUnitType.Star));
            primaryColumns.Add(new GridLength(30, GridUnitType.Star));

            DataContext = model;
            InitializeComponent();

            //These 2 lines are important to place here after InitializeComponent();
            headerPanel = grdBody;
            tablePanel  = dckBody;

            descriptionColumnIndex = 1;
        }
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบฝากเงินเพื่อเข้าบัญชีเงินเดือน", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "Payroll Deposit Slip", "String", "Document Type Eng");

            rc.SetConfigValue("FontSize", "10", "double", "Font Size");
            rc.SetConfigValue("FontName", "AngsanaUPC", "String", "Font Name");

            rc.SetConfigValue("PageWidthCm", "20.70", "double", "Page Width (CM)");
            rc.SetConfigValue("PageHeightCm", "11.20", "double", "Page Height (CM)");
            rc.SetConfigValue("MarginLeftCm", "0.00", "double", "Margin Left (CM)");
            rc.SetConfigValue("MarginTopCm", "0.00", "double", "Margin Top (CM)");
            rc.SetConfigValue("MarginRightCm", "0.00", "double", "Margin Right (CM)");
            rc.SetConfigValue("MarginBottomCm", "0.00", "double", "Margin Bottom (CM)");
            rc.SetConfigValue("Language", "TH", "String", "Language");

            rc.SetConfigValue("Filler1Height", "10", "String", "");
            rc.SetConfigValue("Filler2Height", "20", "String", "");
            rc.SetConfigValue("Filler3Height", "50", "String", "");
            rc.SetConfigValue("Filler4Height", "20", "String", "");
            rc.SetConfigValue("Filler5Height", "60", "String", "");

            rc.SetConfigValue("DisplayGridFlag", "Y", "String", "Y=Display, N=Not display");

            //populateDefaultReportConfig(rc);

            return(rc);
        }
Esempio n. 4
0
        protected void populateDefaultReportConfig(MReportConfig rc)
        {
            rc.SetConfigValue("FontSize", "18", "double", "Font Size");
            rc.SetConfigValue("FontName", "AngsanaUPC", "String", "Font Name");
            rc.SetConfigValue("LineWidth", "300", "double", "Line Length");
            rc.SetConfigValue("CustomerBoxWidth", "450", "double", "Customer box Length");
            rc.SetConfigValue("AddressBoxWidth", "450", "double", "Address box Length");
            rc.SetConfigValue("Language", "TH", "String", "Language");
            rc.SetConfigValue("DisplayLogoFlag", "Y", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("DisplayNamePrefixFlag", "Y", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("DisplayItemCodeFlag", "N", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("DisplayBranchFlag", "N", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("DisplayShadowFlag", "Y", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("CustomerBoxHeight", "150", "double", "Customer box Height");

            rc.SetConfigValue("ItemPerPage", "22", "int", "Item per pages");
            rc.SetConfigValue("WrapFlag", "N", "String", "Y=Wrap, N=No wrap");
            rc.SetConfigValue("ItemRowHeight", "30", "double", "Item row heignt in case WrapFlag = N");

            //Custom A4 form Height="29.7cm" Width="21cm"
            rc.SetConfigValue("PageWidthCm", "21", "double", "Page Width (CM)");
            rc.SetConfigValue("PageHeightCm", "29.7", "double", "Page Height (CM)");

            rc.SetConfigValue("MarginLeftCm", "0.54", "double", "Margin Left (CM)");
            rc.SetConfigValue("MarginTopCm", "0.54", "double", "Margin Top (CM)");
            rc.SetConfigValue("MarginRightCm", "0.54", "double", "Margin Right (CM)");
            rc.SetConfigValue("MarginBottomCm", "0.54", "double", "Margin Bottom (CM)");
        }
Esempio n. 5
0
        public UFormPayrollSlip(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MVPayrollDocument(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;
            payrollDoc = (MVPayrollDocument)model;

            pageNo    = page;
            pageCount = totalPage;
            pageParam = param;
            rptConfig = cfg;

            init();

            int idx = pageNo - 1;

            item = payrollDoc.GetItemByIndex(idx);
            if (item == null)
            {
                item = new MVPayrollDocumentItem(new Wis.WsClientAPI.CTable(""));
            }

            item.InitializeAfterLoaded();

            DataContext = model;
            InitializeComponent();
        }
Esempio n. 6
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("FontSize", "16", "double", "Font Size");
            rc.SetConfigValue("FontName", "AngsanaUPC", "String", "Font Name");
            rc.SetConfigValue("Language", "TH", "String", "Language");

            //Custom Cheque form Height="9cm" Width="17.5cm" Tanachat Bank Cheque
            rc.SetConfigValue("PageWidthCm", "18", "double", "Page Width (CM)");
            rc.SetConfigValue("PageHeightCm", "9", "double", "Page Height (CM)");

            rc.SetConfigValue("MarginLeftCm", "0", "double", "Margin Left (CM)");
            rc.SetConfigValue("MarginTopCm", "0", "double", "Margin Top (CM)");
            rc.SetConfigValue("MarginRightCm", "0", "double", "Margin Right (CM)");
            rc.SetConfigValue("MarginBottomCm", "0", "double", "Margin Bottom (CM)");

            rc.SetConfigValue("PositionChequeDateFmt", "500,10", "String", "ChequeDateFmt Position");
            rc.SetConfigValue("PositionCompany", "100,10", "String", "Company Position");
            rc.SetConfigValue("PositionPayeeName", "100,70", "String", "PayeeName Position");
            rc.SetConfigValue("PositionNumberAsText", "120,100", "String", "NumberAsText Position");
            rc.SetConfigValue("PositionChequeAmountFmt", "500,120", "String", "ChequeAmountFmt Position");
            rc.SetConfigValue("PositionAcPayeeOnly", "80,40", "String", "AcPayeeOnly Position");
            rc.SetConfigValue("PositionHolderMask", "300,70", "String", "Holder Mask Position");
            rc.SetConfigValue("MaskingText", "######", "String", "Masking Text");

            rc.SetConfigValue("IsAcPayeeOnlyText", "A/C PAYEE ONLY", "String", "IsAcPayeeOnly Text");

            return(rc);
        }
        public UFormEmployeeLeave(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MEmployeeLeave(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;
            leaveDoc   = (MEmployeeLeave)model;

            pageNo    = page;
            pageCount = totalPage;
            pageParam = param;
            rptConfig = cfg;

            init();

            int idx = pageNo - 1;

            //item = payrollDoc.LeaveRecords(idx);
            //if (item == null)
            //{
            //    item = new MLeaveRecord(new Wis.WsClientAPI.CTable(""));
            //}

            //item.InitializeAfterLoaded();
            //PopulateDummyRecords(leaveDoc);

            DataContext = leaveDoc;
            InitializeComponent();
        }
        public UFormPurchaseOrderService(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MAuxilaryDoc(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;
            pageNo     = page;
            pageCount  = totalPage;
            pageParam  = param;
            rptConfig  = cfg;


            init();

            MAuxilaryDoc ad = (dataSource as MAuxilaryDoc);

            numberTextAmount = ad.ArApAmtFmt;

            primaryColumns.Clear();

            primaryColumns.Add(new GridLength(31, GridUnitType.Star));
            primaryColumns.Add(new GridLength(9, GridUnitType.Star));
            primaryColumns.Add(new GridLength(9, GridUnitType.Star));
            primaryColumns.Add(new GridLength(9, GridUnitType.Star));
            primaryColumns.Add(new GridLength(9, GridUnitType.Star));
            primaryColumns.Add(new GridLength(9, GridUnitType.Star));
            primaryColumns.Add(new GridLength(8, GridUnitType.Star));
            primaryColumns.Add(new GridLength(8, GridUnitType.Star));
            primaryColumns.Add(new GridLength(8, GridUnitType.Star));

            DataContext = model;
            InitializeComponent();
        }
Esempio n. 9
0
        public static Boolean SaveReportConfig(UpdateFunction saveFunc, MReportConfig rptConfig)
        {
            rptConfig.PrepareForSaving();
            CTable o = OnixWebServiceAPI.SaveReportConfig(rptConfig.GetDbObject());

            return(true);
        }
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบเบิกสินค้าคงคลัง", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "Inventory Export", "String", "Document Type Eng");
            rc.SetConfigValue("FontSize", "18", "double", "Font Size");
            rc.SetConfigValue("FontName", "AngsanaUPC", "String", "Font Name");
            rc.SetConfigValue("LineWidth", "200", "double", "Line Length");
            rc.SetConfigValue("CustomerBoxWidth", "450", "double", "Customer box Length");
            rc.SetConfigValue("AddressBoxWidth", "450", "double", "Address box Length");
            rc.SetConfigValue("Language", "TH", "String", "Language");
            rc.SetConfigValue("DisplayLogoFlag", "Y", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("DisplayNamePrefixFlag", "Y", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("DisplayItemCodeFlag", "N", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("DisplayBranchFlag", "N", "Boolean", "Y=Show, N=Hide");
            rc.SetConfigValue("DisplayShadowFlag", "Y", "Boolean", "Y=Show, N=Hide");

            rc.SetConfigValue("ItemPerPage", "22", "int", "Item per pages");

            //Custom A4 form Height="29.7cm" Width="21cm"
            rc.SetConfigValue("PageWidthCm", "21", "double", "Page Width (CM)");
            rc.SetConfigValue("PageHeightCm", "29.7", "double", "Page Height (CM)");

            rc.SetConfigValue("MarginLeftCm", "0.54", "double", "Margin Left (CM)");
            rc.SetConfigValue("MarginTopCm", "0.54", "double", "Margin Top (CM)");
            rc.SetConfigValue("MarginRightCm", "0.54", "double", "Margin Right (CM)");
            rc.SetConfigValue("MarginBottomCm", "0.54", "double", "Margin Bottom (CM)");

            return(rc);
        }
Esempio n. 11
0
        private void cmdConfig_Click(object sender, RoutedEventArgs e)
        {
            if (rpt == null)
            {
                return;
            }

            MReportConfig      cfg = rpt.GetReportConfig();
            WinFormConfigParam wc  = new WinFormConfigParam("", cfg);

            wc.ShowDialog();

            if (wc.IsOK)
            {
                cfg            = wc.Config;
                cfg.IsModified = true;

                rpt.UpdateReportConfig(wc.Config);
                cmdSave.IsEnabled = cfg.IsModified;

                rpt.UpdateReportConfig(cfg);
                rpt.isPageRange = false;
                rpt.SetDataSourceAndParam(dataSource, cfg);
                rpt.CreateFixedDocument();
                docViewer.Document = rpt.GetFixedDocument();

                //CUtil.LoadPageNavigateCombo(cboPageNo, rpt.PageCount);
                //CUtil.LoadPageCombo(cboFromPage, rpt.PageCount);
                //CUtil.LoadPageCombo(cboToPage, rpt.PageCount);
            }
        }
Esempio n. 12
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            CReportFactory.InitReports();
            paginator  = CReportFactory.GetReportObject(dat);
            this.Title = this.Title + " : " + paginator.GetType().Name;
            CUtil.EnableForm(false, this);
            rptCfg = CReportConfigs.GetReportConfig(null, dat.Code);
            CUtil.EnableForm(true, this);

            String paperType = "1";

            if (rptCfg == null)
            {
                radLandScape.IsChecked = true;
                rptCfg            = new MReportConfig(new CTable(""));
                rptCfg.ReportName = dat.Code;
            }
            else
            {
                paperType = rptCfg.PaperType;
                if (rptCfg.PageOrientation.Equals("LANDSCAPE"))
                {
                    radLandScape.IsChecked = true;
                }
                else
                {
                    radPotrait.IsChecked = true;
                }
            }

            CUtil.LoadPaperType(cboPaperType, false, paperType);

            constructFieldEntry();
            constructUI();
        }
Esempio n. 13
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            populateDefaultReportConfig(rc);

            return(rc);
        }
Esempio n. 14
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบเสร็จรับเงิน", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "OFFICIAL RECEIPT", "String", "Document Type Eng");

            populateDefaultReportConfig(rc);

            return(rc);
        }
Esempio n. 15
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบแจ้งหนี้/ใบกำกับภาษี", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "DELIVERY ORDER/TAX INVOICE", "String", "Document Type Eng");

            populateDefaultReportConfig(rc);

            return(rc);
        }
Esempio n. 16
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบสำคัญรับ", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "RECEIVE VOUCHER", "String", "Document Type Eng");

            populateDefaultReportConfig(rc);

            return(rc);
        }
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบยืมพัสดุ", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "INVENTORY BORROW DOCUMENT", "String", "Document Type Eng");

            populateDefaultReportConfig(rc);

            return(rc);
        }
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบกำกับภาษี / ใบเสร็จ", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "TAX INVOICE / RECEIPT", "String", "Document Type Eng");

            populateDefaultReportConfig(rc);

            return(rc);
        }
Esempio n. 19
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบสั่งซื้อ / PURCHASE ORDER", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "PURCHASE ORDER", "String", "Document Type Eng");

            populateDefaultReportConfig(rc);

            return(rc);
        }
Esempio n. 20
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "QUOTATION", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "QUOTATION", "String", "Document Type Eng");

            populateDefaultReportConfig(rc);

            return(rc);
        }
Esempio n. 21
0
        private void cmdSave_Click(object sender, RoutedEventArgs e)
        {
            if (rpt == null)
            {
                return;
            }

            MReportConfig cfg = rpt.GetReportConfig();

            CReportConfigs.SaveReportConfig(null, cfg);

            cfg.IsModified    = false;
            cmdSave.IsEnabled = cfg.IsModified;
        }
Esempio n. 22
0
        public UFormQuotation(MBaseModel model, int page, int totalPage, int rowRemark, MReportConfig cfg)
        {
            dataSource = model;
            pageNo     = page;
            pageCount  = totalPage;

            RowRemark = rowRemark;

            rptConfig = cfg;

            DataContext = model;

            InitializeComponent();
        }
Esempio n. 23
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("DocumentTypeThai", "ใบแจ้งเงินเดือน", "String", "Document Type Thai");
            rc.SetConfigValue("DocumentTypeEng", "Payroll Slip", "String", "Document Type Eng");

            rc.SetConfigValue("Filler1Height", "10", "String", "Heigh of top space filler");
            rc.SetConfigValue("Filler2Height", "10", "String", "Heigh of area above tax ID");
            rc.SetConfigValue("Filler3Height", "0", "String", "Heigh of area below tax ID");

            populateDefaultReportConfig(rc);

            return(rc);
        }
        public UFormBillSummary(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MAccountDoc(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;
            pageNo     = page;
            pageCount  = totalPage;
            pageParam  = param;
            rptConfig  = cfg;

            init();

            ad = (dataSource as MAccountDoc);
            numberTextAmount = ad.ArApAmt;
            amountFmt        = ad.ArApAmtFmt;

            if (pageNo != pageCount)
            {
                //Only last page will show the number
                numberTextAmount = "";
            }

            primaryColumns.Clear();

            primaryColumns.Add(new GridLength(13, GridUnitType.Star));
            primaryColumns.Add(new GridLength(26, GridUnitType.Star));
            primaryColumns.Add(new GridLength(18, GridUnitType.Star));
            primaryColumns.Add(new GridLength(18, GridUnitType.Star));
            primaryColumns.Add(new GridLength(33, GridUnitType.Star));
            primaryColumns.Add(new GridLength(20, GridUnitType.Star));

            DataContext = model;
            InitializeComponent();

            //These 2 lines are important to place here after InitializeComponent();
            headerPanel = grdBody;
            tablePanel  = stckBody;

            descriptionColumnIndex = 4;
        }
Esempio n. 25
0
        public UReceiveVoucher(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MAccountDoc(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;

            pageNo    = page;
            pageCount = totalPage;
            pageParam = param;
            rptConfig = cfg;

            init();

            MAccountDoc ad = (dataSource as MAccountDoc);

            numberTextAmount = ad.CashReceiptAmtFmt;

            primaryColumns.Clear();

            primaryColumns.Add(new GridLength(15, GridUnitType.Star));
            primaryColumns.Add(new GridLength(15, GridUnitType.Star));
            primaryColumns.Add(new GridLength(14, GridUnitType.Star));
            primaryColumns.Add(new GridLength(12, GridUnitType.Star));

            primaryColumns.Add(new GridLength(9, GridUnitType.Star));
            primaryColumns.Add(new GridLength(11, GridUnitType.Star));
            primaryColumns.Add(new GridLength(11, GridUnitType.Star));
            primaryColumns.Add(new GridLength(13, GridUnitType.Star));

            DataContext = model;
            InitializeComponent();

            //These 2 lines are important to place here after InitializeComponent();
            headerPanel = grdBody;
            tablePanel  = stckBody;

            descriptionColumnIndex = 1;
        }
        public UFormPayrollWithdraw(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MVPayrollDocument(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;
            payrollDoc = (MVPayrollDocument)model;

            pageNo    = page;
            pageCount = totalPage;
            pageParam = param;
            rptConfig = cfg;

            String format1 = rptConfig.GetConfigValue("Format1");

            format1Widths = format1.Split('|');

            String format2 = rptConfig.GetConfigValue("Format2");

            format2Widths = format2.Split('|');

            init();

            int idx = pageNo - 1;

            item = payrollDoc.GetItemByIndex(idx);
            if (item == null)
            {
                item = new MVPayrollDocumentItem(new Wis.WsClientAPI.CTable(""));
            }

            numberTextAmount = item.GrandTotalAmount;

            item.InitializeAfterLoaded();

            DataContext = model;
            InitializeComponent();
        }
Esempio n. 27
0
        public UFormChequePayment(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            if (model == null)
            {
                model = new MCheque(new Wis.WsClientAPI.CTable(""));
            }

            dataSource = model;
            pageNo     = page;
            pageCount  = totalPage;
            pageParam  = param;
            rptConfig  = cfg;

            init();

            MCheque ad = (dataSource as MCheque);

            numberTextAmount = ad.ChequeAmountFmt;

            DataContext = model;
            InitializeComponent();
        }
Esempio n. 28
0
        public static MReportConfig GetReportConfig(GetInfoFunction getInfoFunc, String reportKey)
        {
            CTable o = new CTable("");

            o.SetFieldValue("REPORT_NAME", reportKey);

            ArrayList arr = OnixWebServiceAPI.GetReportConfigList(o);

            if (arr.Count <= 0)
            {
                return(null);
            }

            CTable obj = (CTable)arr[0];

            CTable info = OnixWebServiceAPI.GetReportConfigInfo(obj);

            MReportConfig m = new MReportConfig(info);

            m.InitReportConfig();

            return(m);
        }
Esempio n. 29
0
        public override MReportConfig CreateDefaultConfigValues()
        {
            MReportConfig rc = new MReportConfig(new Wis.WsClientAPI.CTable(""));

            rc.SetConfigValue("FontSize", "18", "double", "Font Size");
            rc.SetConfigValue("FontName", "AngsanaUPC", "String", "Font Name");
            rc.SetConfigValue("LineWidth", "300", "double", "Line Length");
            rc.SetConfigValue("CustomerBoxWidth", "450", "double", "Customer box Length");
            rc.SetConfigValue("AddressBoxWidth", "450", "double", "Address box Length");
            rc.SetConfigValue("Language", "TH", "String", "Language");

            rc.SetConfigValue("ItemPerPage", "22", "int", "Item per pages");

            rc.SetConfigValue("HeaderTextSize", "17", "int", "Table header text size");
            rc.SetConfigValue("TopHeaderTextSize", "22", "int", "Top most header text size");
            rc.SetConfigValue("BottomLeftBoxWidth", "320", "int", "Bottom Left Box Width");
            rc.SetConfigValue("BottomBoxHeight", "160", "int", "Bottom Box Height");

            //Custom A4 form Height="29.7cm" Width="21cm"
            rc.SetConfigValue("PageWidthCm", "21", "double", "Page Width (CM)");
            rc.SetConfigValue("PageHeightCm", "29.7", "double", "Page Height (CM)");

            rc.SetConfigValue("MarginLeftCm", "0.54", "double", "Margin Left (CM)");
            rc.SetConfigValue("MarginTopCm", "0.54", "double", "Margin Top (CM)");
            rc.SetConfigValue("MarginRightCm", "0.54", "double", "Margin Right (CM)");
            rc.SetConfigValue("MarginBottomCm", "0.54", "double", "Margin Bottom (CM)");

            rc.SetConfigValue("IsCopyReport", "Y", "String", "Is Copy Report?");
            rc.SetConfigValue("HowManyIssue", "4", "int", "How many issue?");
            rc.SetConfigValue("Issue1", "", "String", "Issue 1");
            rc.SetConfigValue("Issue2", "", "String", "Issue 2");
            rc.SetConfigValue("Issue3", "", "String", "Issue 3");
            rc.SetConfigValue("Issue4", "", "String", "Issue 4");
            rc.SetConfigValue("DisplayNamePrefixFlag", "Y", "String", "Y - to show company prefix, N - not show");

            return(rc);
        }
Esempio n. 30
0
        public UFormQuotationAttachSheet(MBaseModel model, int page, int totalPage, MReportConfig cfg, CReportPageParam param)
        {
            dataSource = model;
            pageNo     = page;
            pageCount  = totalPage;
            pageParam  = param;
            rptConfig  = cfg;

            init();

            MAuxilaryDoc ad = (dataSource as MAuxilaryDoc);

            if (ad != null)
            {
                numberTextAmount = ad.ArApAmtFmt;
                amountFmt        = ad.ArApAmtFmt;
            }

            primaryColumns.Clear();

            primaryColumns.Add(new GridLength(10, GridUnitType.Star));
            primaryColumns.Add(new GridLength(100, GridUnitType.Star));
            primaryColumns.Add(new GridLength(20, GridUnitType.Star));
            primaryColumns.Add(new GridLength(20, GridUnitType.Star));
            primaryColumns.Add(new GridLength(25, GridUnitType.Star));
            primaryColumns.Add(new GridLength(15, GridUnitType.Star));

            DataContext = model;
            InitializeComponent();

            //These 2 lines are important to place here after InitializeComponent();
            headerPanel = grdBody;
            tablePanel  = dckBody;

            descriptionColumnIndex = 1;
        }