private SiteConfigViewModel GetLogoInfo(int UR_TYPE_ID, string UR_ID) { var result = new SiteConfigViewModel(); string userId = string.Empty; var userService = new AccountApp(); if (UR_TYPE_ID == 3) { userId = userService.GetParentIDByUser(UR_ID); } else {//管理员 userId = UR_ID; } SiteConfigEntity site = null; var sitConfigApp = new SiteConfigApp(); site = sitConfigApp.GetSiteConfigByUser(userId); result.Address = site.Address; var siteViewModel = GetSiteModel(site.Address); result.City = siteViewModel.City; result.CountryName = siteViewModel.CountryName; result.Default_Location = site.Default_Location; result.Id = site.Id; result.Login_UR_ID = site.Login_UR_ID; result.Organization = siteViewModel.Organization; result.ProfileImgUrl = site.ProfileImgUrl; result.SiteName = site.SiteName; result.State = siteViewModel.State; result.TimeZone = siteViewModel.TimeZone; return(result); }
public AccControl(string id) { InitializeComponent(); if (id.Contains("NV") == true) { p = NhanVien.Ins.getNV(id); acc = Account.Ins.getAccount(id); } }
public TrangChinh(AccountApp account = null, formLogin ParentForm = null) { this.ParentForm = ParentForm; this.Account = account; normalRegion = Region; this.Controls.Clear(); InitializeComponent(); Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.Width, this.Height, 40, 40)); hideSubMenu(); }
static void Main(string[] args) { //Console.WriteLine("Explicit"); //ExplicitApp.Run(); // //Console.WriteLine("Implicit"); //ImplicitApp.Run(); AccountApp.Run(); Console.ReadLine(); }
public accForm(string id) { InitializeComponent(); if (id.Contains("NV") == true) { p = NhanVien.Ins.getNV(id); acc = Account.Ins.getAccount(id); } else { pK = KHACHHANG.Ins.getKH(id); accK = ACCOUNTKHACHHANG.Ins.getAccDTO(id); } }
public AccountApp getAccount(string id) { string query = "SELECT USERNAME, PASSWORDS FROM ACCOUNT WHERE ID = @ID "; DataTable tmp = Provider.Ins.ExcuteQuery(query, new object[] { id }); if (tmp.Rows.Count == 0) { return(null); } AccountApp rs = new AccountApp(); rs.Username = tmp.Rows[0][0].ToString(); rs.Passwords = tmp.Rows[0][1].ToString(); return(rs); }
private void OpenOrderThucAnForm(string userName, bool isAdmin) { AccountApp account = new AccountApp(); account.Username = userName; account.Id = Account.Ins.getMaNV(userName); TrangChinh trangChinh = new TrangChinh(account, this); if (isAdmin == true) { trangChinh.loadStaff(); } else { trangChinh.loadAdmin(); } this.Hide(); trangChinh.ShowDialog(); //this.Hide(); //this.Close(); }
public ActionResult Index() { var userTypeId = LoginHelper.UserType; var userId = LoginHelper.UserID; ViewBag.UserType = userTypeId; var userService = new AccountApp(); var model = GetLogoInfo(userTypeId, userId.ToString()); if (model != null) { var site = GetSiteModel(model.Address); if (site != null) { model.TimeZone = site.TimeZone; model.Organization = site.Organization; model.City = site.City; model.State = site.State; model.CountryName = site.CountryName; } } return(View(model)); }
public static void ProcessInput(int keyValue) { if (keyValue > 12) { Console.WriteLine("Enter One Valid Number"); readValue(); } else { switch (keyValue) { case 1: Console.WriteLine("Enter the name of the Provider you want to search : "); String searchString = Console.ReadLine(); //String searchString = "Dag"; ProviderApp.searchProvider(searchString); LoginApp.readValue(); break; case 2: //AddSiteAccount.addSiteAccount(); AddProviderAccount.AddAccount(1); break; case 3: AddProviderAccount.AddAccount(2); break; case 4: AddProviderAccountNew.AddAccount(1); break; case 5: AddProviderAccountNew.AddAccount(2); break; case 6: AccountApp.accountApp(1); break; case 7: HoldingApp.holdingApp(1); break; case 8: TransactionApp.transactionApp(); break; case 9: AssetSummaryApp.assetSummaryApp(); break; case 10: HoldingApp.holdingApp(2); break; case 11: AccountApp.accountApp(2); break; case 0: Environment.Exit(0); break; } } }