Esempio n. 1
0
        public static DataTable CheckGSTExculisveOrInclusive(String companyId)
        {
            CreateConnectionString objcon = new CreateConnectionString();
            DataTable dt = new DataTable();
            String    companyDbString = GetCompanyDbString(companyId, "Accounts");

            if (!string.IsNullOrEmpty(companyDbString))
            {
                using (SqlConnection con = new SqlConnection(companyDbString))
                {
                    try
                    {
                        using (SqlCommand cmd = new SqlCommand("uspCheckGSTExculisveOrInclusiveSQMS", con))
                        {
                            using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
                            {
                                con.Open();
                                cmd.CommandType = CommandType.StoredProcedure;
                                sda.Fill(dt);
                            }
                        }
                    }
                    finally
                    {
                        if (con.State == ConnectionState.Open)
                        {
                            con.Close();
                        }
                    }
                }
            }
            return(dt);
        }
Esempio n. 2
0
 public SQLExecution(string companyID, string moduleName)
 {
     MessageHeader       = "SqlExecution";
     objConnectionString = new  CreateConnectionString();
     ConnectionString    = objConnectionString.GetCompanyDbString(companyID, moduleName);
 }