public Admin(string comandefilename) { m_adminSQL = new AdminSQL(); m_commandeFilename = comandefilename; UpdateProduit(); UpdateCommande(); if (!File.Exists(comandefilename)) { m_Listecommandes = new ListeCommandes(); SaveCommandes(); } m_Listecommandes = XMLSerialisation.DeserialiserCommandes(m_commandeFilename); }
public static string GetSslCipher() { try { using (var scope = AppSession.TypeContainer.BeginLifetimeScope()) { var dbs = scope.Resolve <IDataBaseService>(); return(dbs.FetchRecordAsync(AdminSQL.SelectSsLCipher(), (R) => R.GetString(1)).Result); } } catch (Exception) { throw; } }
public static DateTime GetServerDateTime() { try { var serverDateTime = DateTime.MinValue; using (var scope = AppSession.TypeContainer.BeginLifetimeScope()) { var dbs = scope.Resolve <IDataBaseService>(); DateTime.TryParse(dbs.FetchSingleValueAsync(AdminSQL.SelectServerTime()).Result, out serverDateTime); return(serverDateTime); } } catch (Exception) { throw; } }
/// <summary> /// 查看用户是否存在 /// </summary> /// <param name="sUserName"></param> /// <returns></returns> public bool Login_Admin(string sUserName) { AdminSQL adminSQL = new AdminSQL(); return(adminSQL.Login_Admin(sUserName)); }
public JsonResult UserDropDowns() { return(Json(AdminSQL.userDropDowns(), JsonRequestBehavior.AllowGet)); }
/// <summary> /// 查看单个 /// </summary> /// <param name="nID"></param> /// <returns></returns> public Admin Get_SingAdmin(string sUserName) { AdminSQL adminSQL = new AdminSQL(); return(adminSQL.Get_SingAdmin(sUserName)); }
/// <summary> /// 查看全部 /// </summary> /// <returns></returns> public List <Admin> Get_Admin() { AdminSQL adminSQL = new AdminSQL(); return(adminSQL.Get_Admin()); }
/// <summary> /// 删除 /// </summary> /// <param name="nID"></param> public void Delete_Admin(int nID) { AdminSQL adminSQL = new AdminSQL(); adminSQL.Delete_Admin(nID); }
/// <summary> /// 修改 /// </summary> /// <param name="admin"></param> public void Update_Admin(Admin admin) { AdminSQL adminSQL = new AdminSQL(); adminSQL.Update_Admin(admin); }
/// <summary> /// 添加 /// </summary> /// <param name="admin"></param> /// <returns></returns> public int Add_Admin(Admin admin) { AdminSQL adminSQL = new AdminSQL(); return(adminSQL.Add_Admin(admin)); }