}                                          //= int.Parse(this.lb_uncofirm.Text.ToString());
        //     public string header { get; set; }



        //   public string header { get; set; }
        public kaconfirmPayment(View.CreatenewContract Contract, string ContractNo, int Batchno, string Programe, int PayID, int SubID, double PaidRequestAmt, string Description, string PaymentDoc)
        {
            #region khowri taoj



            InitializeComponent();
            //     this.header = header;
            this.Contractview   = Contract;
            this.ContractNo     = ContractNo;
            this.Description    = Description;
            this.PaymentDoc     = PaymentDoc;
            this.Batchno        = Batchno;
            this.Programe       = Programe;
            this.PayID          = PayID;
            this.SubID          = SubID;
            this.PaidRequestAmt = PaidRequestAmt;

            //string connection_string = Utils.getConnectionstr();
            //LinqtoSQLDataContext dc = new LinqtoSQLDataContext(connection_string);
            txtPaydoc.Text    = PaymentDoc.Trim();
            lbcontractno.Text = ContractNo.Trim();
            txtpaidnote.Text  = Description.Trim();

            lbBactchdoc.Text  = Batchno.ToString();
            lb_programe.Text  = Programe.ToString();
            lbpayid.Text      = PayID.ToString();
            lbsubid.Text      = SubID.ToString();
            lbpaymentamt.Text = PaidRequestAmt.ToString();

            pickdatedoneon.Value = DateTime.Today;
            #endregion
        }
Esempio n. 2
0
        public Createpayment(View.CreatenewContract formcreatCtract, string contractno, int payiD)
        {
            #region khoi taok


            InitializeComponent();
            this.contractno          = contractno;
            this.formcreatCtract     = formcreatCtract;
            txt_contractno.Text      = contractno;
            txt_contractno.Enabled   = false;
            txt_requestedamt.Enabled = false;
            this.payiD = payiD;
            this.subid = subid;
            // this.txt_batchno.Enabled = false;
            loaddetailprogarme();

            loaddatagriviewpayment();

            if (Model.Contract.checkispaidandalive(contractno) == false)
            {
                button3.Visible = false;
                button2.Visible = false;
                button5.Visible = false;
            }

            //&&
            //if (Model.Contract.checkispaidandalive(tb_contractno.Text) == false && formlabel.Text == "DISPLAY PAYMENT CONTRACT")
            //{
            //    MessageBox.Show(" Không được làm tiếp Payment \n Lý do: \n Hợp đông đã close \n Hoặc chưa hoàn thành thanh toán!", "Thông báo !", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            //}

            #endregion
        }
Esempio n. 3
0
 public CreatnewCust(View.CreatenewContract contractnew)
 {
     InitializeComponent();
     this.contractnew = contractnew;
     //   txtcode.Enabled = false;
 }
Esempio n. 4
0
        //    formcreatCtract
        public Reportsview(DataTable tbl1, DataTable tbl2, string rptname, int BatchNo, string contractno, View.CreatenewContract formcreatCtract)   //IQueryable rs
        {
            InitializeComponent();

            this.tbl1 = tbl1;

            this.BatchNo = BatchNo;
            //    this.subid = subid;
            this.contractno      = contractno;
            this.formcreatCtract = formcreatCtract;


            this.reportViewer1.LocalReport.ReportEmbeddedResource = "KAmanagement.Reports." + rptname + "";
            // chọn báo cáo hiển thị

            // chọn data hiển thị


            ReportDataSource datasource  = new ReportDataSource("DataSet1", tbl1);
            ReportDataSource datasource2 = new ReportDataSource("DataSet2", tbl2);

            this.reportViewer1.LocalReport.DataSources.Clear();

            this.reportViewer1.LocalReport.DataSources.Add(datasource);
            this.reportViewer1.LocalReport.DataSources.Add(datasource2);

            this.reportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing);

            // chọn data hiển thị

            // chọn kiểu hiển thị
            this.reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);

            // this.reportViewer1.ZoomMode = ZoomMode.Percent;
            // this.reportViewer1.ZoomPercent = 100;
            this.reportViewer1.ZoomMode                   = ZoomMode.PageWidth;
            this.reportViewer1.ShowExportButton           = false;
            this.reportViewer1.ShowPageNavigationControls = false;


            #region kiểm tra printed  OK

            string connection_string = Utils.getConnectionstr();

            LinqtoSQLDataContext dc = new LinqtoSQLDataContext(connection_string);


            var rschangepritcheck = (from tbl_kacontractsdetailpayment in dc.tbl_kacontractsdetailpayments
                                     where tbl_kacontractsdetailpayment.BatchNo == BatchNo// && tbl_kacontractsdatadetail.SubID == subid && tbl_kacontractsdatadetail.ContractNo == contractno
                                     select tbl_kacontractsdetailpayment).FirstOrDefault();



            if (rschangepritcheck != null && rschangepritcheck.PrintChk == true)
            {
                this.reportViewer1.ShowPrintButton = false;

                ///  return;
            }

            #endregion kiểm tra printed
            // this.reportViewer1.ShowPageNavigationControls
            //  this.reportViewer1.ShowExportButto = false;
            //if (rptname == "ARletter.rdlc")
            //{

            ////    tbl_ArletterRpt rptdata = new tbl_ArletterRpt();

            ////    ReportParameter rp0 = new ReportParameter("NO", rptdata.No.ToString());
            //////    ReportParameter rp1 = new ReportParameter("Title", Chart1.Title);
            ////    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp0 });
            //////    this.reportViewer1.LocalReport.Refresh();



            //}
            ////ReportParameter rp0 = new ReportParameter("Report_Parameter_UserName", tbl_ArletterRpt.);
            //ReportParameter rp1 = new ReportParameter("Title", Chart1.Title);
            //ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp0, rp1 });
            //ReportViewer1.LocalReport.Refresh();

            // chọn kiểu hiển thị

            this.reportViewer1.RefreshReport();
        }