示例#1
0
        public void Get_Info_Company()
        {
            Class.DanhMuc_CongTy cty = new Class.DanhMuc_CongTy();
            DataTable            dt  = cty.LoadThongTinCty();

            txtCompanyID.Text      = dt.Rows[0]["CompanyID"].ToString();
            txtCompanyName.Text    = dt.Rows[0]["CompanyName"].ToString();
            txtCompanyAddress.Text = dt.Rows[0]["CompanyAddress"].ToString();
            txtTel.Text            = dt.Rows[0]["Tel"].ToString();
            txtFax.Text            = dt.Rows[0]["Fax"].ToString();
            txtEmail.Text          = dt.Rows[0]["Email"].ToString();
            txtWebsite.Text        = dt.Rows[0]["Website"].ToString();
            txtCompanyTax.Text     = dt.Rows[0]["CompanyTax"].ToString();
            // xu ly photo
            try
            {
                if (dt.Rows[0]["Logo"] != null)
                {
                    Byte[] imgbyte = (byte[])dt.Rows[0]["Logo"];
                    if (imgbyte.Length > 10)
                    {
                        MemoryStream stmPicData = new MemoryStream(imgbyte);
                        Logo.Image = Image.FromStream(stmPicData);
                    }
                    //
                }
            }
            catch { }
        }
        private void Get_Info_Company()
        {
            Class.DanhMuc_CongTy ct = new Class.DanhMuc_CongTy();

            DataTable dt = ct.LoadThongTinCty();

            txtAddress.Text = dt.Rows[0]["CompanyAddress"].ToString();
            txtTel.Text     = dt.Rows[0]["Tel"].ToString();;
        }