private void btnLuuThongTin_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(cboCoSo.Text))
                {
                    throw new ArgumentException("Cơ sở không được trống");
                }

                GlobalSettings.CoSoId = O2S_Common.TypeConvert.Parse.ToInt32(cboCoSo.SelectedValue.ToString());

                COSOTRUNGTAM _coso = CoSoTrungTamLogic.Select(GlobalSettings.CoSoId);
                GlobalSettings.CoSo_Ten = _coso.TenCoSo;
                if (_coso.LogoCoSo != null && _coso.LogoCoSo.Length > 0)
                {
                    byte[] Empimage = (byte[])(_coso.LogoCoSo).ToArray();
                    GlobalSettings.CoSo_LogoCoSo = Image.FromStream(new MemoryStream(Empimage));
                }
                else
                {
                    GlobalSettings.CoSo_LogoCoSo = null;
                }

                //this.Hide();
                this.Visible = false;
            }
            catch (Exception ex)
            {
                O2S_Common.Logging.LogSystem.Error(ex);
            }
        }
Exemplo n.º 2
0
        private void gridKH_Click(object sender, EventArgs e)
        {
            LockPanelControl();

            try
            {
                LoadUI(CoSoTrungTamLogic.Select(O2S_Common.TypeConvert.Parse.ToInt32(gridKH.SelectedRows[0].Cells["clmCoSoId"].Value.ToString())));
            }
            catch
            {
                ResetPanelControl();
            }
        }