Ejemplo n.º 1
0
        private void mdServiceInit()
        {
            fMode = "N";
            string strSQL;

            //strSQL = "select * from tblServiceType";
            //comboBind(mdSV_cbNServiceTypeID,strSQL,"strDescription","nServiceTypeID",true);

            DataTable dt;
            DataSet   _ds;

            _ds    = new DataSet();
            strSQL = "select * from tblServiceType";
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "Table" }, new SqlParameter("@strSQL", strSQL));
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0]    = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nServiceTypeID", "Service Type ID", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            col[1]    = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription", "Description", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            myManager = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(repositoryItemLookUpEdit1, dt, col, "strDescription", "nServiceTypeID", "Manager");


            strSQL  = "select A.*,B.strDescription as ServiceTypeName from tblService A inner join tblServiceType B on A.nServiceTypeID=B.nServiceTypeID";
            strSQL += " and (A.strServiceCode like '%" + txtSearch.Text + "%' or  A.strDescription like '%" + txtSearch.Text + "%')";
            _ds     = new DataSet();
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL));
            dtService = _ds.Tables["table"];
            this.gridControlMd_Service.DataSource = dtService;
        }
Ejemplo n.º 2
0
 private void LoadEmployeeList()
 {
     _ds    = new DataSet();
     strSQL = "select nEmployeeID, strEmployeeName from tblEmployee";
     SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "Table" }, new SqlParameter("@strSQL", strSQL));
     dt = _ds.Tables["Table"];
     DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
     col[0]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID", "Employee ID", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
     col[1]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName", "Name", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
     myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtEmployee.Properties, dt, col, "strEmployeeName", "nEmployeeID", "Stock");
 }
Ejemplo n.º 3
0
 private void LoadBranchCodeList()
 {
     _ds    = new DataSet();
     strSQL = "select null [strBranchCode],'' [strBranchName] union select strBranchCode, strBranchName from tblBranch";
     _ds    = SqlHelperUtils.ExecuteDatasetText(strSQL, null);
     //SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
     dt = _ds.Tables["Table"];
     DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
     col[0]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strBranchCode", "Branch Code", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
     col[1]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strBranchName", "Description", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
     myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtBranch.Properties, dt, col, "strBranchName", "strBranchCode", "Branch");
 }
Ejemplo n.º 4
0
        private void LoadInstructorList()
        {
            _ds    = new DataSet();
            strSQL = "select null [nEmployeeID],'' [strEmployeeName] union select nEmployeeID, strEmployeeName from tblEmployee where fInstructor=1 order by strEmployeeName";
            _ds.Tables.Add("Table");
            _ds = SqlHelperUtils.ExecuteDatasetText(strSQL, null);


            //(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID", "Employee ID", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            col[1]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName", "Name", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtInstructor.Properties, dt, col, "strEmployeeName", "nEmployeeID", "Instructor");
        }
Ejemplo n.º 5
0
        private void init()
        {
            DataSet _ds    = new DataSet();
            string  strSQL = "select * from tblEmployee";

            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "Table" }, new SqlParameter("@strSQL", strSQL));
            DataTable dt = _ds.Tables["Table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID", "Employee Id", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName", "Employee Name", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);

            myManager = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(repositoryItemLookUpEdit1, dt, col, "strEmployeeName", "nEmployeeID", "Manager");
            BindGrid();
        }
Ejemplo n.º 6
0
        private void LoadInstructorList()
        {
            _ds = new DataSet();
            strSQL = "select null [nEmployeeID],'' [strEmployeeName] union select nEmployeeID, strEmployeeName from tblEmployee where fInstructor=1 order by strEmployeeName";
            _ds.Tables.Add("Table");
            _ds = SqlHelperUtils.ExecuteDatasetText(strSQL,null);

            //(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID","Employee ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName","Name",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtInstructor.Properties,dt,col,"strEmployeeName","nEmployeeID","Instructor");
        }
Ejemplo n.º 7
0
        private void LoadClassTypeList()
        {
            _ds = new DataSet();
            strSQL = "select null [nClassTypeID],'' [strDescription] union select nClassTypeID, strDescription from tblClassType";

            _ds = SqlHelperUtils.ExecuteDatasetText(strSQL,null);
            //SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nClassTypeID","Class Type",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtClassType.Properties,dt,col,"strDescription","nClassTypeID","ClassType");
        }
Ejemplo n.º 8
0
 private void LoadEmployeeList()
 {
     _ds = new DataSet();
     strSQL = "select nEmployeeID, strEmployeeName from tblEmployee";
     SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
     dt = _ds.Tables["Table"];
     DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
     col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID","Employee ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
     col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName","Name",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
     myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtEmployee.Properties,dt,col,"strEmployeeName","nEmployeeID","Stock");
 }
Ejemplo n.º 9
0
        private void mdCompInit()
        {
            //			DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            //
            //			col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strBranchCode","BranchCode",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            //			col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strBranchName","Branch Name",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            string strSQL;
            DataSet _ds = new DataSet();
            strSQL = "Select * from TblTax";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            myTax = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lk_MD_ComTax.Properties,dt,"strDescription","nTaxID","Tax");
            myBankCode = new ACMS.XtraUtils.LookupEditBuilder.BankCodeLookupEditBuilder(lk_MD_BankCode.Properties);

            myBankBranchCode = new ACMS.XtraUtils.LookupEditBuilder.BankBranchCodeLookupEditBuilder(lk_MD_BankBranchCode.Properties,"");

            DataSet _dsTblCompany = new DataSet();
            strSQL = "select * from tblCompany";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_dsTblCompany,new string[] {"Company"}, new SqlParameter("@strSQL", strSQL) );

            foreach(DataRow dr in _dsTblCompany.Tables["Company"].Rows)
            {
                mdComp_txtStrCompanyCode.EditValue = dr["strCompanyCode"].ToString();
                mdComp_txtStrCompanyName.EditValue = dr["strCompanyName"].ToString();
                EmployeeIdLastNo.EditValue = dr["EmployeeIdLastNo"].ToString();
                this.lk_MD_ComTax.EditValue = dr["nTaxID"];
                this.mdComp_txtMForgetCardRate.EditValue = dr["mForgetCardRate"];
                this.mdComp_txtMReplaceCardRate.EditValue = dr["mReplaceCardRate"];
                this.mdComp_txtMRegistrationFees.EditValue = dr["mRegistrationFees"];
                this.lk_MD_BankCode.EditValue = dr["strBankCode"];
                this.lk_MD_BankBranchCode.EditValue = dr["strBranchCode"];
                this.mdComp_txtStrAccountName.EditValue = dr["strAccountName"];
                this.mdComp_txtStrAccountNo.EditValue = dr["strAccountNo"];
                this.mdComp_txtStrBatchNo.EditValue = dr["strBatchNo"];
                this.mdComp_txtStrCompanyCodeRef.EditValue = dr["strCompanyCodeRef"];
                this.mdComp_txtStrCompanyID.EditValue = dr["strCompanyID"];
                this.mdComp_txtStrCPFReferenceNo.EditValue = dr["strCPFReferenceNo"];
                this.mdComp_txtNCancelBookingLimit.EditValue = dr["nCancelBookingLimit"];
                this.mdComp_txtMInstructorLateDeductionFee.EditValue = dr["mInstructorLateDeductionFee"];
                this.mdComp_txtNUOBMthlyBooking.EditValue = dr["nUOBMonthlyBooking"];
                this.mdComp_dtUOBWeekdayPeakStart.EditValue = dr["dtUOBWeekdayPeakStart"];
                this.mdComp_dtUOBWeekdayPeakEnd.EditValue = dr["dtUOBWeekdayPeakEnd"];
                this.mdComp_dtUOBWeekendPeakStart.EditValue = dr["dtUOBWeekendPeakStart"];
                this.mdComp_dtUOBWeekendPeakEnd.EditValue = dr["dtUOBWeekendPeakEnd"];
                this.mdComp_txtNNonMembershipNo.EditValue = dr["nNonMembershipNo"];
                this.mdComp_txtNDaysToExpire.EditValue = dr["nDaysToExpire"];
                this.mdComp_txtNClassLeft.EditValue = dr["nClassLeft"];
                this.mdComp_txtStrBJReportBranch.EditValue = dr["strBJReportDir"];
                this.mdComp_txtStrPayrollDir.EditValue = dr["strPayrollDir"];
                this.mdComp_txtNMaxCarryForwardLeaveCF.EditValue = dr["nMaxCarryForwardLeave"];
            }
        }
Ejemplo n.º 10
0
        private void mdServiceInit()
        {
            fMode="N";
            string strSQL;

            //strSQL = "select * from tblServiceType";
            //comboBind(mdSV_cbNServiceTypeID,strSQL,"strDescription","nServiceTypeID",true);

            DataTable dt;
            DataSet _ds;

            _ds = new DataSet();
            strSQL = "select * from tblServiceType";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nServiceTypeID","Service Type ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myManager = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(repositoryItemLookUpEdit1,dt,col,"strDescription","nServiceTypeID","Manager");

            strSQL = "select A.*,B.strDescription as ServiceTypeName from tblService A inner join tblServiceType B on A.nServiceTypeID=B.nServiceTypeID";
            strSQL += " and (A.strServiceCode like '%" + txtSearch.Text + "%' or  A.strDescription like '%" + txtSearch.Text + "%')";
            _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dtService=_ds.Tables["table"];
            this.gridControlMd_Service.DataSource = dtService;
        }
Ejemplo n.º 11
0
        private void BindBranch()
        {
            string strSQL = "Select strBranchCode,strBranchName from TblBranch Where nBrStatusID =1 and strBranchCode In ("
                +"Select strBranchCode from tblemployeebranchrights Where nEmployeeId = " + employee.Id + ")";

            comboBind(cmbBranch, strSQL, "strBranchName", "strBranchCode", true);
            cmbBranch.Properties.Items.Insert(0,new DevExpress.XtraEditors.Controls.ImageComboBoxItem("- Please Select -",""));
            cmbBranch.SelectedIndex = 0;

            //lkedtBranch2
            strSQL = "Select strBranchCode,strBranchName from TblBranch Where nBrStatusID =1";
            DataSet _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"},
                new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strBranchCode","Branch Code",15,
                DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strBranchName","Description",15,
                DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtBranch2,dt,col,"strBranchCode",
                "strBranchCode","Branch");
        }
Ejemplo n.º 12
0
        private void init()
        {
            DataSet _ds = new DataSet();
            string strSQL = "select * from tblEmployee";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["Table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID","Employee Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName","Employee Name",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            myManager = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(repositoryItemLookUpEdit1,dt,col,"strEmployeeName","nEmployeeID","Manager");
            BindGrid();
        }