Exemplo n.º 1
0
        /// <summary>
        /// Function to fill company path
        /// </summary>
        public void FillDBS()
        {
            decimal decCompanyId = PublicVariables._decCurrentCompanyId;

            PublicVariables._decCurrentCompanyId = 0;
            CompanyPathSP spCompanyPath = new CompanyPathSP();
            DataTable     dtbl          = new DataTable();

            try
            {
                dtbl = spCompanyPath.CompanyPathViewAll();
                DataRow dr = dtbl.NewRow();
                dr["companyPath"] = Application.StartupPath + "\\Data\\COMP";
                dr["companyId"]   = -1;
                dtbl.Rows.InsertAt(dr, 0);
                cbUpdation.BindingContext = new BindingContext();
                cbUpdation.DataSource     = dtbl;
                cbUpdation.DisplayMember  = "companyPath";
                cbUpdation.ValueMember    = "companyId";
                for (int i = 0; i < cbUpdation.Items.Count; ++i)
                {
                    cbUpdation.SetItemChecked(i, true);
                }
                PublicVariables._decCurrentCompanyId = decCompanyId;
            }
            catch (Exception ex)
            {
                MessageBox.Show("SPIns:1" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemplo n.º 2
0
        public List <DataTable> CompanyPathViewAll()
        {
            CompanyPathSP    spCompanyPath = new CompanyPathSP();
            List <DataTable> listObj       = new List <DataTable>();

            try
            {
                listObj = spCompanyPath.CompanyPathViewAll();
            }
            catch (Exception ex)
            {
                MessageBox.Show("CP5" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(listObj);
        }