private void MstUser_Load(object sender, System.EventArgs e)
        {
            try
            {
                lblMode.Text = J_Mode.View;
                cmnService.J_StatusButton(this, lblMode.Text);

                BtnDelete.BackColor = Color.LightGray;
                BtnDelete.Enabled   = false;

                ControlVisible(false);
                ClearControls();

                // set the Help Grid Column Header Text & behavior
                // (0) Header Text
                // (1) Width
                // (2) Format
                // (3) Alignment
                // (4) NullToText
                // (5) Visible
                // (6) AutoSizeMode
                string[,] strMatrix1 = { { "UserId",       "0",   "",  "Right", "", "", "" },
                                         { "Display Name", "525", "S", "",      "", "", "" },
                                         { "Login Id",     "250", "S", "",      "", "", "" },
                                         { "Status",       "150", "0", "",      "", "", "" } };
                strMatrix = strMatrix1;

                // (0) Data Value in DataTable
                // (1) Data Type in DataTable
                // (2) Display Text in Front-end
                // (3) Display Text Type
                string[,] strCaseEndMatrix = { { "=0", "N", "ACTIVE",   "T" },
                                               { "=1", "N", "INACTIVE", "T" } };

                strOrderBy = "DISPLAY_NAME";
                strQuery   = "SELECT USER_ID                           AS USER_ID," +
                             "              DISPLAY_NAME                      AS DISPLAY_NAME," +
                             "              LOGIN_ID                          AS LOGIN_ID," +
                             "              " + cmnService.J_SQLDBFormat("USER_CATEGORY", J_SQLColFormat.Case_End, strCaseEndMatrix) + " AS USER_CATEGORY " +
                             "       FROM   MST_USER " +
                             "       WHERE  " + cmnService.J_SQLDBFormat("LOGIN_ID", J_SQLColFormat.UCase) + " <> 'ADMIN' " +
                             "       AND    BRANCH_ID = " + J_Var.J_pBranchId + " ";
                strSQL = strQuery + "ORDER BY " + strOrderBy;
                if (dsetGridClone != null)
                {
                    dsetGridClone.Clear();
                }
                dsetGridClone = dmlService.J_ShowDataInGrid(ref ViewGrid, strSQL, strMatrix);       //Show Data into the Grid

                txtUserName.Enabled = false;
                lblTitle.Text       = this.Text;
                ViewGrid_Click(sender, e);
            }
            catch (Exception err_Handler)
            {
                cmnService.J_UserMessage(err_Handler.Message);
            }
        }
Exemple #2
0
        private void MstInvoiceSeries_Load(object sender, System.EventArgs e)
        {
            try
            {
                lblMode.Text = J_Mode.View;
                cmnService.J_StatusButton(this, lblMode.Text);

                BtnDelete.BackColor = Color.LightGray;
                BtnDelete.Enabled   = false;

                ControlVisible(false);
                ClearControls();

                // set the Help Grid Column Header Text & behavior
                // (0) Header Text
                // (1) Width
                // (2) Format
                // (3) Alignment
                // (4) NullToText
                // (5) Visible
                // (6) AutoSizeMode
                string[,] strMatrix1 = { { "InvoiceSeriesID", "0",   "",  "Right", "", "", "" },
                                         { "CompanyID",       "0",   "",  "Right", "", "", "" },
                                         { "Prefix",          "250", "S", "",      "", "", "" },
                                         { "Company Name",    "250", "",  "",      "", "", "" },
                                         { "Start No",        "80",  "",  "Right", "", "", "" },
                                         { "Last No",         "80",  "",  "Right", "", "", "" },
                                         { "Last Date",       "100", "",  "",      "", "", "" },
                                         { "Display Text",    "190", "",  "",      "", "", "" } };
                strMatrix = strMatrix1;

                strOrderBy = "MST_INVOICE_SERIES.PREFIX";
                strQuery   = "SELECT MST_INVOICE_SERIES.INVOICE_SERIES_ID AS INVOICE_SERIES_ID," +
                             "              MST_COMPANY.COMPANY_ID               AS COMPANY_ID," +
                             "              MST_INVOICE_SERIES.PREFIX            AS PREFIX," +
                             "              MST_COMPANY.COMPANY_NAME             AS COMPANY_NAME," +
                             "              MST_INVOICE_SERIES.START_NO          AS START_NO," +
                             "              MST_INVOICE_SERIES.LAST_NO           AS LAST_NO," +
                             "            " + cmnService.J_SQLDBFormat("MST_INVOICE_SERIES.LAST_DATE", J_SQLColFormat.DateFormatDDMMYYYY) + "  AS LAST_DATE," +
                             "              MST_INVOICE_SERIES.HEADER_DISPLAY_TEXT AS HEADER_DISPLAY_TEXT" +
                             "       FROM   MST_INVOICE_SERIES," +
                             "              MST_COMPANY" +
                             "       WHERE  MST_INVOICE_SERIES.COMPANY_ID = MST_COMPANY.COMPANY_ID " +
                             "       AND    MST_INVOICE_SERIES.BRANCH_ID  = " + J_Var.J_pBranchId + " ";

                strSQL = strQuery + "ORDER BY " + strOrderBy;
                if (dsetGridClone != null)
                {
                    dsetGridClone.Clear();
                }
                dsetGridClone = dmlService.J_ShowDataInGrid(ref ViewGrid, strSQL, strMatrix);       //Show Data into the Grid

                lblTitle.Text = this.Text;
                ViewGrid_Click(sender, e);
            }
            catch (Exception err_Handler)
            {
                cmnService.J_UserMessage(err_Handler.Message);
            }
        }
Exemple #3
0
        private void MstTax_Load(object sender, System.EventArgs e)
        {
            try
            {
                lblMode.Text = J_Mode.View;
                cmnService.J_StatusButton(this, lblMode.Text);

                BtnDelete.BackColor = Color.LightGray;
                BtnDelete.Enabled   = false;

                ControlVisible(false);
                ClearControls();

                // set the Help Grid Column Header Text & behavior
                // (0) Header Text
                // (1) Width
                // (2) Format
                // (3) Alignment
                // (4) NullToText
                // (5) Visible
                // (6) AutoSizeMode
                string[,] strMatrix1 = { { "TaxId",           "0",   "",     "Right", "", "", "" },
                                         { "Tax Description", "650", "S",    "",      "", "", "" },
                                         { "Tax Percentage.", "100", "0.00", "Right", "", "", "" },
                                         { "",                "1",   "",     "Right", "", "", "" },
                                         { "Created By",      "200", "S",    "",      "", "", "" } };
                strMatrix = strMatrix1;

                strOrderBy = "MST_TAX.TAX_DESC";
                strQuery   = "SELECT MST_TAX.TAX_ID        AS TAX_ID," +
                             "              MST_TAX.TAX_DESC      AS TAX_DESC," +
                             "              MST_TAX.TAX_RATE      AS TAX_RATE," +
                             "              '' ," +
                             "              MST_USER.DISPLAY_NAME AS DISPLAY_NAME" +
                             "       FROM   MST_TAX," +
                             "              MST_USER" +
                             "       WHERE  MST_TAX.USER_ID = MST_USER.USER_ID" +
                             "       AND    MST_TAX.BRANCH_ID  = " + J_Var.J_pBranchId + " ";

                strSQL = strQuery + "ORDER BY " + strOrderBy;
                if (dsetGridClone != null)
                {
                    dsetGridClone.Clear();
                }
                dsetGridClone = dmlService.J_ShowDataInGrid(ref ViewGrid, strSQL, strMatrix);       //Show Data into the Grid

                lblTitle.Text = this.Text;
                ViewGrid_Click(sender, e);
            }
            catch (Exception err_Handler)
            {
                cmnService.J_UserMessage(err_Handler.Message);
            }
        }
        private void MstFAYear_Load(object sender, EventArgs e)
        {
            lblMode.Text = J_Mode.ViewListing;
            cmnService.J_StatusButton(this, lblMode.Text);

            BtnEdit.BackColor   = Color.LightGray;
            BtnEdit.Enabled     = false;
            BtnDelete.BackColor = Color.LightGray;
            BtnDelete.Enabled   = false;

            ControlVisible(false);

            // set the Help Grid Column Header Text & behavior
            // (0) Header Text
            // (1) Width
            // (2) Format
            // (3) Alignment
            // (4) NullToText
            // (5) Visible
            // (6) AutoSizeMode
            string[,] strMatrix1 = { { "FA Id",      "0",   "",           "Right", "", "", "" },
                                     { "Begin Date", "315", "dd/MM/yyyy", "",      "", "", "" },
                                     { "End Date",   "315", "dd/MM/yyyy", "",      "", "", "" },
                                     { "Lock Date",  "315", "dd/MM/yyyy", "",      "", "", "" } };
            strMatrix = strMatrix1;

            strOrderBy = "FAYEAR_ID";
            strQuery   = "SELECT FAYEAR_ID," +
                         "              FA_BEG_DATE," +
                         "              FA_END_DATE," +
                         "              FA_LOCK_DATE " +
                         "       FROM   MST_FAYEAR ";
            strSQL = strQuery + "ORDER BY " + strOrderBy;
            if (dsetGridClone != null)
            {
                dsetGridClone.Clear();
            }
            dsetGridClone = dmlService.J_ShowDataInGrid(ref this.ViewGrid, strSQL, strMatrix);

            lblTitle.Text = this.Text;
            ViewGrid_Click(sender, e);
        }
        private void BtnCancel_Click(object sender, System.EventArgs e)
        {
            try
            {
                //-------------------------------------------
                lblMode.Text = J_Mode.View;
                cmnService.J_StatusButton(this, lblMode.Text);          //Status[i.e. Enable/Visible] of Button, Frame, Grid
                //-------------------------------------------
                //DisableControls();
                //-------------------------------------------

                ControlVisible(false);
                ClearControls();                                        //Clear all the Controls

                //-----------------------------------------------------------
                strSQL = strQuery + "ORDER BY " + strOrderBy;
                //-----------------------------------------------------------
                if (dsetGridClone != null)
                {
                    dsetGridClone.Clear();
                }
                dsetGridClone = dmlService.J_ShowDataInGrid(ref ViewGrid, strSQL, strMatrix);       //Show Data into the Grid
                if (dsetGridClone == null)
                {
                    return;
                }
                //-------------------------------------------
                if (dmlService.J_setGridPosition(ref ViewGrid, dsetGridClone, "INVOICE_HEADER_ID", lngSearchId) == false)
                {
                    BtnAdd.Select();
                }

                cmbCompany.Enabled = true;
                BtnSort.BackColor  = Color.LightGray;
                BtnSort.Enabled    = false;
                BtnPrint.BackColor = Color.LightGray;
                BtnPrint.Enabled   = false;

                //-------------------------------------------
            }
            catch (Exception err_handler)
            {
                cmnService.J_UserMessage(err_handler.Message);
            }
        }
Exemple #6
0
        private void MstParty_Load(object sender, System.EventArgs e)
        {
            try
            {
                //ADDED BY DHRUB ON 03/05/2014 FOR Default Grid Size
                ViewGrid.Size = new Size(1004, 554);

                lblMode.Text = J_Mode.View;
                cmnService.J_StatusButton(this, lblMode.Text);

                BtnDelete.BackColor = Color.LightGray;
                BtnDelete.Enabled   = false;

                ControlVisible(false);
                ClearControls();

                // set the Help Grid Column Header Text & behavior
                // (0) Header Text
                // (1) Width
                // (2) Format
                // (3) Alignment
                // (4) NullToText
                // (5) Visible
                // (6) AutoSizeMode
                string[,] strMatrix1 = { { "PartyID",        "0",   "",  "Right", "", "", "" },
                                         { "Party Name",     "180", "S", "",      "", "", "" },
                                         { "Category",       "180", "S", "",      "", "", "" },
                                         { "Address",        "180", "",  "",      "", "", "" },
                                         { "City",           "80",  "S", "",      "", "", "" },
                                         { "Pin",            "70",  "",  "",      "", "", "" },
                                         { "Contact Person", "130", "S", "",      "", "", "" },
                                         { "Mobile No",      "100", "",  "",      "", "", "" },
                                         { "Phone",          "80",  "S", "",      "", "", "" },
                                         { "Email Id",       "120", "S", "",      "", "", "" },
                                         { "Vat No",         "80",  "S", "",      "", "", "" } };
                strMatrix = strMatrix1;

                strOrderBy = "PARTY_NAME";
                strQuery   = "SELECT MST_PARTY.PARTY_ID                   AS PARTY_ID," +
                             "              MST_PARTY.PARTY_NAME                 AS PARTY_NAME," +
                             "              MST_PARTY_CATEGORY.PARTY_CATEGORY_DESCRIPTION AS PARTY_CATEGORY_DESCRIPTION, " +
                             "              MST_PARTY.ADDRESS1                   AS ADDRESS1," +
                             "              MST_PARTY.CITY                       AS CITY," +
                             "              MST_PARTY.PIN                        AS PIN," +
                             "              MST_PARTY.CONTACT_PERSON             AS CONTACT_PERSON," +
                             "              MST_PARTY.MOBILE_NO                  AS MOBILE_NO," +
                             "              MST_PARTY.PHONE_NO                   AS PHONE_NO," +
                             "              MST_PARTY.EMAIL_ID                   AS EMAIL_ID," +
                             "              MST_PARTY.VAT_NO                     AS VAT_NO " +
                             "       FROM   MST_PARTY, " +
                             "              MST_PARTY_CATEGORY " +
                             "       WHERE  MST_PARTY.PARTY_CATEGORY_ID = MST_PARTY_CATEGORY.PARTY_CATEGORY_ID " +
                             "       and    MST_PARTY.BRANCH_ID         = " + J_Var.J_pBranchId + " ";

                strSQL = strQuery + "ORDER BY " + strOrderBy;
                if (dsetGridClone != null)
                {
                    dsetGridClone.Clear();
                }
                dsetGridClone = dmlService.J_ShowDataInGrid(ref ViewGrid, strSQL, strMatrix);       //Show Data into the Grid

                lblTitle.Text = this.Text;
                ViewGrid_Click(sender, e);
            }
            catch (Exception err_Handler)
            {
                cmnService.J_UserMessage(err_Handler.Message);
            }
        }
        private void MstCompany_Load(object sender, System.EventArgs e)
        {
            try
            {
                //ADDED BY DHRUB ON 03/05/2014 FOR Default Grid Size
                ViewGrid.Size = new Size(1004, 554);

                lblMode.Text = J_Mode.View;
                cmnService.J_StatusButton(this, lblMode.Text);

                BtnDelete.BackColor = Color.LightGray;
                BtnDelete.Enabled   = false;

                ControlVisible(false);
                ClearControls();

                // set the Help Grid Column Header Text & behavior
                // (0) Header Text
                // (1) Width
                // (2) Format
                // (3) Alignment
                // (4) NullToText
                // (5) Visible
                // (6) AutoSizeMode
                string[,] strMatrix1 = { { "CompanyID",       "0",   "",  "Right", "", "", "" },
                                         { "Company Name",    "280", "S", "",      "", "", "" },
                                         { "PAN",             "100", "S", "",      "", "", "" },
                                         { "Address",         "200", "",  "",      "", "", "" },
                                         { "VAT No.",         "90",  "S", "",      "", "", "" },
                                         { "CST No.",         "90",  "",  "",      "", "", "" },
                                         { "Service Tax No.", "130", "S", "",      "", "", "" },
                                         { "CIN No.",         "90",  "",  "",      "", "", "" } };
                strMatrix = strMatrix1;

                strOrderBy = "COMPANY_NAME";
                strQuery   = "SELECT COMPANY_ID     AS COMPANY_ID," +
                             "              COMPANY_NAME   AS COMPANY_NAME," +
                             "              PAN            AS PAN," +
                             "              ADDRESS1       AS ADDRESS1," +
                             "              VAT_NO         AS VAT_NO," +
                             "              CST_NO         AS CST_NO," +
                             "              SERVICE_TAX_NO AS SERVICE_TAX_NO," +
                             "              CIN_NO         AS CIN_NO," +
                             "              CONTACT_NO     AS CONTACT_NO" +
                             "       FROM   MST_COMPANY " +
                             "       WHERE  MST_COMPANY.BRANCH_ID         = " + J_Var.J_pBranchId + " ";

                strSQL = strQuery + "ORDER BY " + strOrderBy;
                if (dsetGridClone != null)
                {
                    dsetGridClone.Clear();
                }
                dsetGridClone = dmlService.J_ShowDataInGrid(ref ViewGrid, strSQL, strMatrix);       //Show Data into the Grid

                lblTitle.Text = this.Text;
                ViewGrid_Click(sender, e);
            }
            catch (Exception err_Handler)
            {
                cmnService.J_UserMessage(err_Handler.Message);
            }
        }
Exemple #8
0
        private void MstUser_Load(object sender, System.EventArgs e)
        {
            try
            {
                lblMode.Text = J_Mode.View;
                cmnService.J_StatusButton(this, lblMode.Text);

                BtnDelete.BackColor = Color.LightGray;
                BtnDelete.Enabled   = false;
                BtnAdd.BackColor    = Color.LightGray;
                BtnAdd.Enabled      = false;
                BtnSort.BackColor   = Color.LightGray;
                BtnSort.Enabled     = false;
                BtnSearch.BackColor = Color.LightGray;
                BtnSearch.Enabled   = false;
                //
                ControlVisible(false);
                ClearControls();
                //
                ViewGrid.Height = 546;
                // set the Help Grid Column Header Text & behavior
                // (0) Header Text
                // (1) Width
                // (2) Format
                // (3) Alignment
                // (4) NullToText
                // (5) Visible
                // (6) AutoSizeMode
                string[,] strMatrix1 = { { "EMAIL_TYPE_ID", "0",   "",  "Right", "", "", "" },
                                         { "Email Type",    "850", "S", "",      "", "", "" },
                                         { "",              "100", "S", "",      "", "", "" } };
                strMatrix = strMatrix1;

                // (0) Data Value in DataTable
                // (1) Data Type in DataTable
                // (2) Display Text in Front-end
                // (3) Display Text Type
                string[,] strInactiveMatrix = { { "=0", "N", "",         "T" },
                                                { "=1", "N", "INACTIVE", "T" } };

                strOrderBy = "EMAIL_TYPE_DESC";
                strQuery   = "SELECT EMAIL_TYPE_ID," +
                             "              EMAIL_TYPE_DESC," +
                             "              " + cmnService.J_SQLDBFormat("INACTIVE_FLAG", J_SQLColFormat.Case_End, strInactiveMatrix) + " AS INACTIVE_FLAG " +
                             "       FROM   MST_EMAIL_CATEGORY ";
                strSQL = strQuery + "ORDER BY " + strOrderBy;
                if (dsetGridClone != null)
                {
                    dsetGridClone.Clear();
                }
                dsetGridClone = dmlService.J_ShowDataInGrid(ref ViewGrid, strSQL, strMatrix);       //Show Data into the Grid

                //txtUserName.Enabled = false;
                lblTitle.Text = this.Text;
                ViewGrid_Click(sender, e);
            }
            catch (Exception err_Handler)
            {
                cmnService.J_UserMessage(err_Handler.Message);
            }
        }