示例#1
0
        internal void AuditLoad(string ConnString, string BConnString, clsBL.clsBL classBL, clsTable.clsTable classTable,
                                string section)
        {
            string globalSection = section;
            TB = classTable;
            BusinessLanguage = classBL;

            DBConnString = ConnString;
            BaseConnString = BConnString;
            sectioncbo = section;

            txtUserDetails.Text = BusinessLanguage.Userid + " - " + BusinessLanguage.Region + " - " + BusinessLanguage.BussUnit;
            txtMiningType.Text = BusinessLanguage.MiningType;
            txtBonusType.Text = BusinessLanguage.BonusType;
            txtDatabaseName.Text = TB.DBName;

            lstNames = TB.getAllFromSelectedTable(DBConnString, "AUDIT", "Tablename");

            foreach (string s in lstNames)
            {
                cboTableName.Items.Add(s.Trim());

            }
        }
示例#2
0
 internal void FormLoad(clsBL.clsBL Business, SqlConnection Conn)
 {
     bl = Business;
     BaseConn = Conn;
 }
示例#3
0
        internal void PayrollSendLoad(SqlConnection myConn, SqlConnection BConn, clsBL.clsBL classBL, clsTable.clsTable classTable, clsTableFormulas classTableFormulas, clsMain.clsMain Main, string section)
        {
            if (section == "MANUAL")
            {

                globalSection = section;
                Base = Main;
                TBFormulas = classTableFormulas;
                TB = classTable;
                BusinessLanguage = classBL;

                tstConn = myConn;
                BaseConn = BConn;

                txtBussUnit.Text = BusinessLanguage.BussUnit + " - " + BusinessLanguage.Region;
                txtBussUnit.Enabled = false;
                cboPayrollGroup.Text = TB.TBName.Trim();

                DateTime today = DateTime.Today;
                strDay = strDay.Substring(0, 2 - today.Day.ToString().Trim().Length) + today.Day.ToString().Trim();
                strMonth = strMonth.Substring(0, 2 - today.Month.ToString().Trim().Length) + today.Month.ToString().Trim();

                cboMiningType.Text = BusinessLanguage.MiningType;

                cboBonusType.Text = BusinessLanguage.BonusType;  //amp
                cboSection.Text = globalSection;
                earnCode = TB.createDataTableWithAdapterSelectAll(Base.DBConnectionString, "EARNINGSCODES", " Where Tablename = 'MANUALPAY'"); //amp
                List<string> employeeType = TB.loadDistinctValuesFromColumn(earnCode, "EMPLOYEETYPE");

                foreach (string s in employeeType)
                {
                    cboEmployeeType.Items.Add(s.ToString().Trim());
                }

                txtPeriod.Text = Base.Period;
                cboPayRollInd.Enabled = false;
                cboEarningsCode.Enabled = false;
                cboMiningType.Enabled = false;
                cboBonusType.Enabled = false;
                cboSection.Enabled = false;
                btnGenerate.Visible = false;

            }
            else
            {
                btnManual.Visible = false;
                globalSection = section;
                Base = Main;
                TBFormulas = classTableFormulas;
                TB = classTable;
                BusinessLanguage = classBL;

                tstConn = myConn;
                BaseConn = BConn;

                txtBussUnit.Text = BusinessLanguage.BussUnit + " - " + BusinessLanguage.Region;
                txtBussUnit.Enabled = false;
                cboPayrollGroup.Text = TB.TBName.Trim();

                DateTime today = DateTime.Today;
                strDay = strDay.Substring(0, 2 - today.Day.ToString().Trim().Length) + today.Day.ToString().Trim();
                strMonth = strMonth.Substring(0, 2 - today.Month.ToString().Trim().Length) + today.Month.ToString().Trim();

                cboMiningType.Text = BusinessLanguage.MiningType;

                cboBonusType.Text = BusinessLanguage.BonusType;

                cboSection.Text = globalSection;

                //dt = Base.GetDataByRegion(BusinessLanguage.Region, Base.DBConnectionString);
                earnCode = TB.createDataTableWithAdapterSelectAll(Base.DBConnectionString, "EARNINGSCODES", "Where Tablename != 'MANUALPAY'");
                List<string> employeeType = TB.loadDistinctValuesFromColumn(earnCode, "EMPLOYEETYPE");

                foreach (string s in employeeType)
                {
                    cboEmployeeType.Items.Add(s.ToString().Trim());
                }

                txtPeriod.Text = Base.Period;
                cboPayRollInd.Enabled = false;
                cboEarningsCode.Enabled = false;
                cboMiningType.Enabled = false;
                cboBonusType.Enabled = false;
                cboSection.Enabled = false;

            }
        }