private void LoadRecords()
 {
     if (!string.IsNullOrEmpty(LoadQuery))
     {
         dtResult = new DataTable();
         dtResult = dtrans.SelectData(LoadQuery);
         dataGridView1.DataSource = null;
         dataGridView1.DataSource = dtResult;
         dataGridView1.Refresh();
     }
 }
示例#2
0
        private bool CheckandInjectCode(clsVariableSettings cvs)
        {
            bool result = false;

            try
            {
                string SQLSelectSystemInfo = "select Count(*) from tbl_system_info where isEnabled = 1 and ProgramCode='" + cv.Crypt(programname) + "' and LicenseCode = '" + cvs.LicenseCode + "' and ActivationCode = '" + cvs.ActivationCode + "'";
                cdt = new clsDatabaseTransactions();
                DataTable dtResult    = cdt.SelectData(SQLSelectSystemInfo);
                int       RowAffected = dtResult.Rows.Count;
                RowAffected = RowAffected == 1 ? int.Parse(dtResult.Rows[0][0].ToString()) : 0;
                if (RowAffected == 0)
                {
                    string SQLInsertSystemInfo = "Insert into tbl_system_info(ProgramCode,LicenseCode,ActivationCode)" + " Values ('" + cv.Crypt(programname) + "','" + cvs.LicenseCode + "','" + cvs.ActivationCode + "')";
                    result = cdt.InsertData(SQLInsertSystemInfo);
                }
                else
                {
                    result = true;
                }
            }
            catch
            {
            }
            return(result);
        }
示例#3
0
 private void LoadRecords()
 {
     if (!string.IsNullOrEmpty(QueryRecords))
     {
         dataGridView1.DataSource = null;
         dataGridView1.DataSource = dtrans.SelectData(QueryRecords);
         dataGridView1.Refresh();
     }
 }
        private void LoadRecords()
        {
            string    query     = "SELECT sysID as 'ID', Transaction_Name AS 'Transaction',Amount FROM tbl_condo_transactionlistinfo WHERE isenabled = 1";
            DataTable dtRecords = new DataTable();

            dtRecords = dtrans.SelectData(query);
            if (dtRecords.Rows.Count > 0)
            {
                dataGridView1.DataSource = dtRecords;
            }
        }
示例#5
0
        private void loadRoomNumber()
        {
            string QueryRoom = "SELECT ui.sysID as 'ID',ui.UnitName,fi.FloorName,ui.AreaSQM,ui.isMontlyDueComputed,ui.MonthlyDue,ui.TotalDue FROM tbl_condo_unitinfo ui LEFT JOIN tbl_condo_floorinfo fi ON ui.FloorAssociate = fi.sysid WHERE ui.isEnabled = 1  ORDER BY ui.UnitName asc";

            dtRoomInfo = dtrans.SelectData(QueryRoom);
            if (dtRoomInfo.Rows.Count > 0)
            {
                cbUnitNo.DataSource    = dtRoomInfo;
                cbUnitNo.ValueMember   = "ID";
                cbUnitNo.DisplayMember = "UnitName";
            }
        }
示例#6
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataTable dtBillingTransaction = new DataTable();

            if (string.IsNullOrEmpty(textBox1.Text))
            {
                MessageBox.Show("Error: Please enter Transaction Code to generated.", "Invalid Transaction Code", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            else
            {
                string QueryBilling = "SELECT MONTHNAME(co.BillStart) AS MonthName,co.YEAR,co.BillStart,co.BillEnd, ui.UnitName,CONCAT(ci.LastName,',', ci.FirstName,' ',ci.MiddleName) AS CustomerName,bd.BillingAmount,bd.BillingDescription,bd.BillingNotes FROM tbl_condo_billinginfo bi LEFT JOIN tbl_condo_billingdetails bd ON bi.sysID = bd.BillingRefID LEFT JOIN tbl_condo_cutoffinfo co ON bi.CutoffID = co.sysID LEFT JOIN tbl_condo_unitinfo ui ON bi.UnitNo = ui.SysID LEFT JOIN tbl_condo_customerinfo ci ON bi.CustomerID = ci.sysID WHERE bi.PrimaryKey = '" + textBox1.Text + "' and bi.isEnabled = 1 and bi.isVoid = 0";

                dtBillingTransaction = dtrans.SelectData(QueryBilling);

                if (dtBillingTransaction.Rows.Count == 0)
                {
                    MessageBox.Show("Error: Please enter Transaction Code to generated.", "No Transaction Code found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                string ClearTextPath = Environment.CurrentDirectory + "\\CONDO\\REPORTING\\SOA_Clear.pdf";
                webBrowser1.Stop();

                webBrowser1.Navigate("about:blank");
                while (webBrowser1.ReadyState != WebBrowserReadyState.Complete)
                {
                    Application.DoEvents();
                    Thread.Sleep(1000);
                }


                string OutputPath = Environment.CurrentDirectory + "\\CONDO\\REPORTING\\SOA.pdf";

                GeneratePDF(OutputPath, dtBillingTransaction);

                if (this.webBrowser1 != null)
                {
                    this.webBrowser1.Navigate(OutputPath);
                }
            }
        }
示例#7
0
        private void LoadRecords()
        {
            string QueryRecords = "Select ui.SysID as 'ID',ui.UnitName as 'Name',f.FloorName as 'Floor',ui.Description, ui.AreaSQM as 'Size',ui.MonthlyDue as 'Monthly Due per SQM',ui.TotalDue as 'Total Due' from tbl_condo_unitinfo ui LEFT JOIN tbl_condo_floorinfo f ON ui.FloorAssociate = f.sysid LEFT JOIN tbl_system_users u ON ui.createdby = u.sysID LEFT Join tbl_system_users p on ui.Updatedby = p.sysid WHERE ui.isEnabled = 1;";

            dataGridView1.DataSource = dtrans.SelectData(QueryRecords);
        }
        private void LoadRecords()
        {
            string QueryRecords = "Select f.sysid as 'ID',f.FloorName as 'FLOOR',f.FloorDescription as 'DESCRIPTION',u.Username as 'CREATED BY',f.DateDefined as 'CREATION DATE',p.Username as 'UPDATED BY',f.LastDateDefined as 'UPDATED DATE' from tbl_CONDO_FloorInfo f LEFT JOIN tbl_system_users u ON f.userID = u.sysID LEFT Join tbl_system_users p on f.LastUpdateUser = p.sysid WHERE f.isEnabled = 1;";

            dataGridView1.DataSource = dtrans.SelectData(QueryRecords);
        }