private void signOutToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); Form formLogin = new formLogin(); formLogin.ShowDialog(); this.Close(); }
private void barButtonItem20_ItemClick(object sender, ItemClickEventArgs e) { this.Hide(); formLogin log = new formLogin(); log.ShowDialog(); }
private void btnLogin_Click(object sender, EventArgs e) { formLogin frm = new formLogin("00001", 1); if (frm.ShowDialog() == DialogResult.OK) { Kullanici = frm.Kullanici; KullaniciYetkileri = Yetki.LoginYetkileriniGetir(1, Kullanici.Sirket, Kullanici.Kod); Mesaj.Bilgi("Giriş başarılı. Yetkiler alındı."); } }
private void BtnDangXuat_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { DialogResult h = MessageBox.Show("Bạn có chắc muốn đăng xuất không?", "Thông báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); if (h == DialogResult.OK) { //Application.Exit(); this.Hide(); formLogin formLogin = new formLogin(); formLogin.ShowDialog(); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); formLogin login = new formLogin(); if (login.ShowDialog() == DialogResult.OK) { Form1 frm = new Form1(); frm.Operador = login.Operador; Application.Run(frm); } }
private void Init() { if (IsFirstLaunch()) { formLogin login = new formLogin(DataAccess.Model.TNTPlan.TNTPlanType.HospitalTarget, ExcelName, Version); login.ShowDialog(); if (login.DialogResult == DialogResult.OK) { LoginUser = login.LoginUser; ExcelUtils.AddProperty(CUSTOM_PROPERTY_USER_ID, LoginUser.UserId.ToString(), this); ExcelUtils.AddProperty(CUSTOM_PROPERTY_USER_NAME, LoginUser.UserName, this); ExcelUtils.AddProperty(CUSTOM_PROPERTY_ROLE_CODE, LoginUser.RoleCode.ToString(), this); //AddProperty(CUSTOM_PROPERTY_POSITION_CODE, LoginUser.PositionCode); ExcelUtils.AddProperty(CUSTOM_PROPERTY_IS_LOGIN_AS, LoginUser.IsLoginAs.ToString(), this); //AddProperty(CUSTOM_PROPERTY_SU_CODE, LoginUser.PositionCode); ExcelUtils.AddProperty(CUSTOM_PROPERTY_IS_FIRST_LAUNCH, "NO", this); if (!CheckTNTPlan()) { SelectSU(); } bll.AddDBLog(LoginUser.PositionCode, LoginUser.UserId, "SFA指标核查", "登录"); Globals.Ribbons.RibbonTnt.SetRibbonButtonEnable(true); Globals.Ribbons.RibbonTnt.InitInfor(); LoadAllData(); } else { //doesn't login Globals.Ribbons.RibbonTnt.SetRibbonButtonEnable(false); Globals.Ribbons.RibbonTnt.InitInfor(); } } else { //not the first launch, read from cache Guid userId = Guid.Parse(ExcelUtils.GetPropertyValue(CUSTOM_PROPERTY_USER_ID, this)); String userName = ExcelUtils.GetPropertyValue(CUSTOM_PROPERTY_USER_NAME, this); Int32 roleCode = Int32.Parse(ExcelUtils.GetPropertyValue(CUSTOM_PROPERTY_ROLE_CODE, this)); String positionCode = ExcelUtils.GetPropertyValue(CUSTOM_PROPERTY_POSITION_CODE, this); bool isLoginAs = Boolean.Parse(ExcelUtils.GetPropertyValue(CUSTOM_PROPERTY_IS_LOGIN_AS, this)); //String selectedProductCode = GetPropertyValue(CUSTOM_PROPERTY_PRODUCT_CODE); LoginUser = new UserInfo { UserId = userId, UserName = userName, RoleCode = roleCode, PositionCode = positionCode, IsLoginAs = isLoginAs }; //SelectSU(); Globals.Ribbons.RibbonTnt.InitInfor(); //Globals.Ribbons.RibbonTnt.SetVisble(); Globals.Ribbons.RibbonTnt.SetRibbonButtonEnable(true); } // //Globals.Ribbons.RibbonTnt.SetRibbonButtonEnable(true); }
private void BtnDangNhap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { formLogin flogin = new formLogin(); flogin.ShowDialog(); }