try    {
            frmCombination.Mode = "Add";
            this.Clear_All_Controls();
            this.Enable_All_Controls();
            if (!(this.Form_Name == "Secured Life"))
                ;
            this.btnGenerate.Enabled = true;
            this.btnChange.Enabled = true;
            this.mskReportDate.Text = Convert.ToString(DateTime.Now);
           ****** 
            if (this.Form_Name == "Secured Life")
                this.txtQuotation.Text = Common_Functionality.GenerateId("ProdMix_Quot_No", "Secured_Life_Quotation", "").ToString();
            else
                this.txtQuotation.Text = Common_Functionality.GenerateId("ProdMix_Quot_No", frmCombination.tblAnnorSet, "").ToString();
            this.SetupDataGridView();
            this.SqlQry = "select Tax_Sec_80CCC_Limit,Tax_Sec_80D_Limit,Tax_rate_Limit from Global_Parameters";
            Connection connection = new Connection();
            if (!connection.OpenConn())
                Application.Exit();
            OleDbCommand oleDbCommand = new OleDbCommand(this.SqlQry, connection.Conn);
            connection.dr = oleDbCommand.ExecuteReader();
            if (connection.dr.HasRows && connection.dr.Read())
            {
                this.mskTaxSlab80C.Text = connection.dr.IsDBNull(connection.dr.GetOrdinal("Tax_rate_Limit")) ? "00.00" : Convert.ToString(connection.dr["Tax_rate_Limit"]);
                this.mskTaxSlab80D.Text = connection.dr.IsDBNull(connection.dr.GetOrdinal("Tax_rate_Limit")) ? "00.00" : Convert.ToString(connection.dr["Tax_rate_Limit"]);
                connection.dr.Close();
            }
            connection.Conn.Close();
            }

So what's the question?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.