Beispiel #1
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"];
            }
        }
Beispiel #2
0
        private void InitLookupEdit()
        {
            myBankCodeLookupEditBuilder = new
                ACMS.XtraUtils.LookupEditBuilder.BankCodeLookupEditBuilder(lkpEdtBankCode.Properties);

            myMonthOfInstallmentLookupEditBuilder = new ACMS.XtraUtils.LookupEditBuilder.MonthOfInstallmentLookupEditBuilder(lkpEdtMonthOfInstallment.Properties,
                "");
            myBankIPPMerchantLookupEditBuilder = new ACMS.XtraUtils.LookupEditBuilder.BankIPPMerchantLookupEditBuilder(lkpEdtMerchantNo.Properties,
                "", "", 0);
        }
        public void Init()
        {
            pnlCtrlBankInfo.Visible = false;
            pnlCtrlSearchProduct.Visible = false;

            if (myCategoryID == 1)
            {
                this.Text = "Purchase a Fitness Package.";
                label1.Text = "Please choose a Fitness Package in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
                simpleButton2.Visible=true;
            }
            else if (myCategoryID == 2)
            {
                this.Text = "Purchase a Fitness GIRO Package.";
                label1.Text = "Please choose a Fitness GIRO Package in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
                pnlCtrlBankInfo.Visible = true;

                myBankCodeLookupEditBuilder = new ACMS.XtraUtils.LookupEditBuilder.BankCodeLookupEditBuilder(lkpEdtBankCode.Properties);
                myBankBranchCodeLookupEditBuilder= new ACMS.XtraUtils.LookupEditBuilder.BankBranchCodeLookupEditBuilder(lkpEdtBankBranchCode.Properties, "");

            }
            else if (myCategoryID == 3)
            {
                this.Text = "Purchase a PT Package.";
                label1.Text = "Please choose a PT Package in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 4)
            {
                this.Text = "Purchase a Spa Single Treatment.";
                label1.Text = "Please choose a Spa Single Treatment in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 5)
            {
                this.Text = "Purchase a Spa Package.";
                label1.Text = "Please choose a Spa Package in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 6)
            {
                this.Text = "Purchase a IPL Package.";
                label1.Text = "Please choose a IPL Package in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 7)
            {
                this.Text = "Purchase a Credit Package.";
                label1.Text = "Please choose a credit package in the following list.";

                colItemCode.FieldName = "strCreditPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 8)
            {
                this.Text = "Purchase a Fitness Combined Package.";
                label1.Text = "Please choose a Fitness Combined Package in the following list.";

                colItemCode.FieldName = "strPackageGroupCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 9)
            {
                this.Text = "Purchase a Spa Combined Package.";
                label1.Text = "Please choose a Spa Combined Package in the following list.";

                colItemCode.FieldName = "strPackageGroupCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 11)
            {
                this.Text = "Purchase a Fitness Product.";
                label1.Text = "Please choose a fitness product in the following list.";

                colBrand.Visible = true;
                colStyle.Visible = true;
                colSize.Visible = true;
                colColor.Visible = true;
                colItemCode.FieldName = "strProductCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mBaseUnitPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
                pnlCtrlSearchProduct.Visible = true;
            }
            else if (myCategoryID == 12)
            {
                this.Text = "Purchase a SPA Product.";
                label1.Text = "Please choose a spa product in the following list.";
                colBrand.Visible = true;
                colStyle.Visible = true;
                colSize.Visible = true;
                colColor.Visible = true;
                colItemCode.FieldName = "strProductCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mBaseUnitPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
                pnlCtrlSearchProduct.Visible = true;
            }
            else if (myCategoryID == 5)
            {
                this.Text = "Purchase a Spa Package.";
                label1.Text = "Please choose a Spa Package in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 14)
            {
                this.Text = "Purchase Courses and Events.";
                label1.Text = "Please choose a Courses/Events in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
            else if (myCategoryID == 23 || myCategoryID == 24)
            {
                this.Text = "Purchase Others";
                label1.Text = "Please choose a record in the following list.";

                colItemCode.FieldName = "strPackageCode";
                colItemDescription.FieldName = "strDescription";
                colItemPrice.FieldName = "mListPrice";
                myDataTable = myPOSHelper.GetDataTable();
                gridControl1.DataSource = myDataTable;
            }
        }