Esempio n. 1
0
 public ActionResult Partial()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         ViewData["listConfig_Announcement"] = new Master_Announcement().GetAllSort("", "CreatedAt", "DESC");
         dbConn.Close();
         return PartialView("_Home", dict);
     }
     else
         return RedirectToAction("LogOn", "Account");
 }
        public ActionResult PartialRole()
        {
            if (userAsset.ContainsKey("View") && userAsset["View"])
            {
                IDbConnection dbConn = new OrmliteConnection().openConn();
                var dict = new Dictionary<string, object>();
                dict["asset"] = userAsset;
                dict["activestatus"] = new CommonLib().GetActiveStatus();
                dict["user"] = dbConn.Select<Auth_User>(p => p.IsActive == true);
                dict["listWH"] = dbConn.Select<WareHouse>(p => p.Status == true);
                dict["listWHL"] = dbConn.Select<WareHouseLocation>(p => p.Status == true);
                dict["listUnit"] = dbConn.Select<DC_AD_Unit>(p => p.Status == true);
                dbConn.Close();

                return PartialView("_ListPublication", dict);
            }
            else
                return RedirectToAction("NoAccess", "Error");
        }
Esempio n. 3
0
        public ActionResult PartialTransporter()
        {
            if (userAsset.ContainsKey("View") && userAsset["View"])
            {
                IDbConnection dbConn = new OrmliteConnection().openConn();
                var dict = new Dictionary<string, object>();
                dict["asset"] = userAsset;
                dict["activestatus"] = new CommonLib().GetActiveStatus();
                // ViewBag.listRegion = dbConn.Select<Master_Territory>("Select TerritoryID, TerritoryName from Master_Territory where Level='Region' ");
                //dict["listrole"] = dbConn.Select<Auth_Role>("SELECT * FROM Auth_Role WHERE Status = 1");
                dbConn.Close();
                return PartialView("_Transporter", dict);

            }
            else
                return RedirectToAction("NoAccess", "Error");
        }
 public ActionResult PartialDeliveryFormula()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         dbConn.Close();
         return PartialView("DeliveryFormula", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }
Esempio n. 5
0
 public ActionResult PartialContract()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         dict["listTranporter"] = dbConn.Select<DC_LG_Transporter>(p => p.Status == true);
         //dict["listContractTransporter"] = new DC_LG_Contract().GetList(" AND 1=1");
         dbConn.Close();
         return PartialView("_Contract", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }
 public ActionResult PartialDeliveryDiscount()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         //dict["listrole"] = dbConn.Select<Auth_Role>("SELECT * FROM Auth_Role WHERE IsActive = 1");
         dbConn.Close();
         return PartialView("_DeliveryDiscount", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }
Esempio n. 7
0
 //
 // GET: /SalesPerson/
 public ActionResult PartialSalesPerson()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         //dict["listSalesPerson"] = dbConn.Select<SalesPerson>(p => p.Status == true);
         dict["listCompany"] = dbConn.Select<Company>(p => p.Status == true);
         dbConn.Close();
         return PartialView("_SalesPerson", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }
Esempio n. 8
0
 public ActionResult PartialRole()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         //dict["user"] = dbConn.Select<Auth_User>(p => p.IsActive == true);
         dict["listWH"] = dbConn.Select<WareHouse>(p => p.Status == true);
         dict["listWHL"] = dbConn.Select<WareHouseLocation>(p => p.Status == true);
         dict["listUnit"] = dbConn.Select<Products>(p => p.Status == true);
         dict["listMerchant"] = dbConn.Select<DC_OCM_Merchant>();
         dict["ListPrinter"] = dbConn.Select<DC_AD_Printer>(p => p.Status == true);
         dict["ListStatus"] = dbConn.Select<DC_Parameter>(s => s.Type == "SOStatus");
         dbConn.Close();
         return PartialView("AD_Order_Header", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }
Esempio n. 9
0
 public ActionResult PartialCustomer()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         dict["listprovince"] = dbConn.Select<Master_Territory>("Select TerritoryID,TerritoryName From Master_Territory where Level ='Province'");
         dict["listdistrict"] = dbConn.Select<Master_Territory>("Select TerritoryID,TerritoryName From Master_Territory where Level ='District'");
         dbConn.Close();
         return PartialView("_Customer", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }
 //=====================================================================================================
 public ActionResult TreeView()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         //IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         //dict["listrole"] = dbConn.Select<Auth_Role>();
         //dict["distributorgroup"] = dbConn.Select<Master_DistributorGroup>();
         //dict["distributor"] = dbConn.Select<Master_Distributor>("SELECT DistributorID, DistributorName FROM Master_Distributor");
         //dbConn.Close();
         return PartialView("_AdminMasterHoliday", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }
 public ActionResult PartialOthersTerritory()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         //dict["listMaster_SKU"] = dbConn.Select<Master_SKU>();
         dbConn.Close();
         return PartialView("_PartialOthersTerritory", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }
Esempio n. 12
0
 public ActionResult PartialDetail(string id)
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["listWH"] = dbConn.Select<WareHouse>(p => p.Status == true);
         dict["listWHL"] = dbConn.Select<WareHouseLocation>(p => p.Status == true);
         dict["listVendor"] = dbConn.Select<Vendor>(p => p.Status == true);
         dict["listWH"] = dbConn.Select<WareHouse>(p => p.Status == true);
         dict["listWHL"] = dbConn.Select<WareHouseLocation>(p => p.Status == true);
         dict["listUnit"] = dbConn.Select<INUnit>(p => p.Status == true);
         dict["SONumber"] = id;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         dbConn.Close();
         if (string.IsNullOrEmpty(id))
         {
             return PartialView("_OP_CreateOrderIndex", dict);
         }
         else
         {
             return PartialView("_OP_CreateOrder", dict);
         }
     }
     else
     {
         return RedirectToAction("NoAccess", "Error");
     }
 }
Esempio n. 13
0
 public ActionResult PartialVendor()
 {
     if (userAsset.ContainsKey("View") && userAsset["View"])
     {
         IDbConnection dbConn = new OrmliteConnection().openConn();
         var dict = new Dictionary<string, object>();
         dict["asset"] = userAsset;
         dict["activestatus"] = new CommonLib().GetActiveStatus();
         dict["listProvince"] = dbConn.Select<Master_Territory>("SELECT TerritoryID, TerritoryID +'-'+ TerritoryName as TerritoryName FROM Master_Territory WHERE Level='Province'");
         dbConn.Close();
         return PartialView("_VendorInfo", dict);
     }
     else
         return RedirectToAction("NoAccess", "Error");
 }