Beispiel #1
0
        public JsonResult getfeatures()
        {
            DatasController             DatasController = new DatasController();
            Dictionary <string, object> parameters      = new Dictionary <string, object>();

            parameters.Add("Action", "getfeatures");
            DatasController.Dispose();
            return(DatasController.execd("Login_sp", parameters));
        }
Beispiel #2
0
        public JsonResult submenubind(string UserID)
        {
            DatasController             DatasController = new DatasController();
            Dictionary <string, object> parameters      = new Dictionary <string, object>();

            parameters.Add("Action", "submenubind");
            parameters.Add("userid", UserID.Trim());
            DatasController.Dispose();
            return(DatasController.execd("Login_sp", parameters));
        }
Beispiel #3
0
        public JsonResult getpermission(string UserId, string submenuid)
        {
            DatasController             DatasController = new DatasController();
            Dictionary <string, object> parameters      = new Dictionary <string, object>();

            parameters.Add("Action", "getpermission");
            parameters.Add("userid", UserId.Trim());
            parameters.Add("submenuid", submenuid.Trim());
            DatasController.Dispose();
            return(DatasController.execd("Login_sp", parameters));
        }
Beispiel #4
0
        public JsonResult setpermission(string userid, string features, string actionid)
        {
            DatasController             DatasController = new DatasController();
            Dictionary <string, object> parameters      = new Dictionary <string, object>();

            parameters.Add("Action", "setpermission");
            parameters.Add("userid", userid.Trim());
            parameters.Add("features", features.Trim());
            parameters.Add("actionm", actionid.Trim());
            DatasController.Dispose();
            return(DatasController.execd("Login_sp", parameters));
        }
Beispiel #5
0
        public ActionResult SaveDailyConsumables(string dailyConsumableTypeId, string ratePerUnit, string startReading)
        {
            try
            {
                DatasController             DatasController = new DatasController();
                Dictionary <string, object> parameters      = new Dictionary <string, object>();
                parameters.Add("Action", "InsertDailyCosumable");
                parameters.Add("dailyConsumableTypeId", Convert.ToInt32(dailyConsumableTypeId));
                parameters.Add("RatePerUnit", Convert.ToDecimal(ratePerUnit));
                parameters.Add("StartReading", Convert.ToDecimal(startReading));

                DatasController.Dispose();
                return(DatasController.execd("uspDailyConsumptions", parameters));
            }
            catch (Exception ex)
            {
                ErrorHandlerClass.LogError(ex);
            }
            return(Json(null, JsonRequestBehavior.AllowGet));
        }
Beispiel #6
0
 public ActionResult SaveDailyConsumptions(string userid, string electricity, string water, string gas)
 {
     try
     {
         DatasController             DatasController = new DatasController();
         Dictionary <string, object> parameters      = new Dictionary <string, object>();
         parameters.Add("Action", "Insert");
         parameters.Add("CreatedBy", Convert.ToInt32(userid));
         parameters.Add("Electricity", electricity.Trim());
         parameters.Add("Water", water.Trim());
         parameters.Add("Gas", gas.Trim());
         DatasController.Dispose();
         return(DatasController.execd("uspDailyConsumptions", parameters));
     }
     catch (Exception ex)
     {
         ErrorHandlerClass.LogError(ex);
     }
     return(Json(null, JsonRequestBehavior.AllowGet));
 }