Exemple #1
0
 public ActionResult Index()
 {
     if (asset.View)
     {
         ViewBag.Create      = asset.Create;
         ViewBag.Update      = asset.Update;
         ViewBag.Delete      = asset.Delete;
         ViewBag.Export      = asset.Export;
         ViewBag.listWebsite = CRM_Website.GetList();
         using (IDbConnection db = OrmliteConnection.openConn())
         {
             ViewBag.listHierarchy1  = db.Select <Hierarchy>(c => c.cap == 1).OrderBy(s => s.id);
             ViewBag.listHierarchy2  = db.Select <Hierarchy>(c => c.cap == 2).OrderBy(s => s.id);
             ViewBag.listHierarchy3  = db.Select <Hierarchy>(c => c.cap == 3).OrderBy(s => s.id);
             ViewBag.listHierarchy4  = db.Select <Hierarchy>(c => c.cap == 4).OrderBy(s => s.id);
             ViewBag.listHierarchy5  = db.Select <Hierarchy>(c => c.cap == 5).OrderBy(s => s.id);
             ViewBag.listHierarchy6  = db.Select <Hierarchy>(c => c.cap == 6).OrderBy(s => s.id);
             ViewBag.listHierarchy7  = db.Select <Hierarchy>(c => c.cap == 7).OrderBy(s => s.id);
             ViewBag.listHierarchy8  = db.Select <Hierarchy>(c => c.cap == 8).OrderBy(s => s.id);
             ViewBag.listHierarchy9  = db.Select <Hierarchy>(c => c.cap == 9).OrderBy(s => s.id);
             ViewBag.listHierarchy10 = db.Select <Hierarchy>(c => c.cap == 10).OrderBy(s => s.id);
             ViewBag.listStatus      = db.Select <BIBIAM.Core.Entities.Parameters>(s => s.Type == "ProductHierarchyStatus").OrderBy(s => s.ID);
         }
         return(View());
     }
     else
     {
         return(RedirectToAction("NoAccessRights", "Error"));
     }
 }
Exemple #2
0
        public ActionResult Index()
        {
            if (asset.View)
            {
                ViewBag.Create      = asset.Create;
                ViewBag.Update      = asset.Update;
                ViewBag.Delete      = asset.Delete;
                ViewBag.Export      = asset.Export;
                ViewBag.listWebsite = CRM_Website.GetList();

                using (IDbConnection db = OrmliteConnection.openConn())
                {
                    //ViewBag.listAll = db.Select<Hierarchy>();
                    ViewBag.listAll           = db.Select <DropListDown>("Select ma_phan_cap as Value , ten_phan_cap as Text from Hierarchy");
                    ViewBag.listStatus        = db.Select <BIBIAM.Core.Entities.Parameters>(s => s.Type == "HierarchyStatus").OrderBy(s => s.ID);
                    ViewBag.listHierarchyType = db.Select <BIBIAM.Core.Entities.Parameters>(s => s.Type == "HierarchyType").OrderBy(s => s.ID);
                }

                return(View());
            }
            else
            {
                return(RedirectToAction("NoAccessRights", "Error"));
            }
        }
Exemple #3
0
 public ActionResult Read([DataSourceRequest] DataSourceRequest request)
 {
     if (asset.View)
     {
         using (IDbConnection dbConn = OrmliteConnection.openConn())
         {
             var data = CRM_Website.ReadAll();
             return(Json(data.ToDataSourceResult(request)));
         }
     }
     else
     {
         return(RedirectToAction("NoAccessRights", "Error"));
     }
 }
 public ActionResult Index()
 {
     if (asset.View)
     {
         ViewBag.Create      = asset.Create;
         ViewBag.Update      = asset.Update;
         ViewBag.Delete      = asset.Delete;
         ViewBag.Export      = asset.Export;
         ViewBag.listWebsite = CRM_Website.GetList();
         return(View());
     }
     else
     {
         return(RedirectToAction("NoAccessRights", "Error"));
     }
 }
Exemple #5
0
 public ActionResult DeleteWebsite(string data)
 {
     if (asset.Delete)
     {
         using (var dbConn = Helpers.OrmliteConnection.openConn())
         {
             string[] separators = { "@@" };
             var      ids        = data.Split(separators, StringSplitOptions.RemoveEmptyEntries);
             // var ids = listid.Split("@@");
             foreach (var id in ids)
             {
                 CRM_Website.Delete(id);
             }
             return(Json(new { success = true, message = "Thành công" }));
         }
     }
     return(Json(new { success = false, message = "Bạn " }));
 }
 public ActionResult Index()
 {
     if (asset.View)
     {
         ViewBag.Create      = asset.Create;
         ViewBag.Update      = asset.Update;
         ViewBag.Delete      = asset.Delete;
         ViewBag.Export      = asset.Export;
         ViewBag.listWebsite = CRM_Website.GetList();
         using (IDbConnection db = OrmliteConnection.openConn())
         {
             ViewBag.listDanhXung = db.Select <BIBIAM.Core.Entities.Parameters>(s => s.Type == "DanhXung").OrderBy(s => s.ID);
             ViewBag.listMerchant = db.Select <Merchant_Info>().OrderBy(s => s.id);
         }
         return(View());
     }
     else
     {
         return(RedirectToAction("NoAccessRights", "Error"));
     }
 }
 public ActionResult Index()
 {
     if (asset.View)
     {
         ViewBag.Create      = asset.Create;
         ViewBag.Update      = asset.Update;
         ViewBag.Delete      = asset.Delete;
         ViewBag.Export      = asset.Export;
         ViewBag.listWebsite = CRM_Website.GetList();
         using (IDbConnection db = OrmliteConnection.openConn())
         {
             ViewBag.listType      = db.Select <Parameters>(s => s.Type == "IMGResizeType");
             ViewBag.listImageType = db.Select <Parameters>(s => s.Type == "ImageType");
         }
         return(View());
     }
     else
     {
         return(RedirectToAction("NoAccessRights", "Error"));
     }
 }
Exemple #8
0
 public ActionResult Index()
 {
     if (asset.View)
     {
         ViewBag.Create      = asset.Create;
         ViewBag.Update      = asset.Update;
         ViewBag.Delete      = asset.Delete;
         ViewBag.Export      = asset.Export;
         ViewBag.listWebsite = CRM_Website.GetList();
         using (IDbConnection db = OrmliteConnection.openConn())
         {
             ViewBag.listStatus        = db.Select <BIBIAM.Core.Entities.Parameters>(s => s.Type == "TTSP").OrderBy(s => s.ID);
             ViewBag.listStatusDuyet   = db.Select <BIBIAM.Core.Entities.Parameters>(s => s.Type == "TTDSP").OrderBy(s => s.ID);
             ViewBag.listStatusXuatBan = db.Select <BIBIAM.Core.Entities.Parameters>(s => s.Type == "StatusPublish").OrderBy(s => s.ID);
         }
         return(View());
     }
     else
     {
         return(RedirectToAction("NoAccessRights", "Error"));
     }
 }