void Caller()
        {
            IClientBuilder builder = new ClientLoader();
            CompanyModel   company = new OurCompany(builder);

            Client client = company.LoadClient();
        }
Exemple #2
0
        public void getOurCompany()
        {
            MySqlConnections conc = new MySqlConnections();

            oc = conc.getCompany();
            if (oc == null)
            {
                oc = new OurCompany();
            }
        }
Exemple #3
0
        public static FormC01 FillC01(string brokerBin, string code, string companyBin, string companyName, string serial)
        {
            FormC01            formc01      = new FormC01();
            OurCompany         ourCompany   = new OurCompany();
            OurCompaniesConsts ourCompanies = new OurCompaniesConsts();

            ourCompanies.GetListOurCompanies();
            ourCompany = ourCompanies.GetListOurCompanies().Where(x => x.bin == brokerBin).First();

            formc01.code   = code;
            formc01.bin    = companyBin;
            formc01.date   = DateTime.Now;
            formc01.name   = companyName;
            formc01.broker = ourCompany;
            formc01.number = serial.Length == 3 ? serial : "0" + serial;
            formc01.codeG  = formc01.broker.code.ToLower() + "g" + formc01.number;
            formc01.codeP  = formc01.broker.code.ToLower() + "p" + formc01.number;
            formc01.codeS  = formc01.broker.code.ToLower() + "s" + formc01.number;

            return(formc01);
        }
Exemple #4
0
        public OurCompany getCompany()
        {
            OurCompany oc = new OurCompany();

            this.dset = new DataSet("m_our_company");
            String sql = "select " +
                         "   *" +
                         " from " +
                         "   m_our_company" +
                         " where" +
                         "   id = 1";

            try
            {
                //SQL接続
                con.Open();
                // データアダプター作成
                MySqlDataAdapter mAdp = new MySqlDataAdapter(sql, this.con);
                // データ抽出&取得
                mAdp.Fill(dset, "m_our_company");

                oc.setZipCode(dset.Tables["m_our_company"].Rows[0]["zip_code"].ToString());
                oc.setPhonetic(dset.Tables["m_our_company"].Rows[0]["phonetic"].ToString());
                oc.setName(dset.Tables["m_our_company"].Rows[0]["name"].ToString());
                oc.setAddress(dset.Tables["m_our_company"].Rows[0]["address"].ToString());
                oc.setPhone(dset.Tables["m_our_company"].Rows[0]["phone"].ToString());
                oc.setFax(dset.Tables["m_our_company"].Rows[0]["fax"].ToString());
            }
            catch (Exception ex)
            {
                Debug.WriteLine(Convert.ToString(ex));
                return(null);
            }
            finally
            {
                this.con.Close();
            }

            return(oc);
        }