Esempio n. 1
0
 public string InsertorUpdateRulesData(string User_Code, RulesDefinitionDataModel objdata)
 {
     try
     {
         DAL_WorkCategoryRule obj = new DAL_WorkCategoryRule();
         return(obj.InsertorUpdateRulesData(User_Code, objdata));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 public JsonResult InsertorUpdateRulesData(RulesDefinitionDataModel objdata)
 {
     try
     {
         BL_WorkCategoryRule obj = new BL_WorkCategoryRule();
         return(Json(obj.InsertorUpdateRulesData(objCurrInfo.GetUserCode(), objdata), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(ex.Message, JsonRequestBehavior.AllowGet));
     }
 }
Esempio n. 3
0
        public string InsertorUpdateRulesData(string User_Code, RulesDefinitionDataModel obj)
        {
            try
            {
                string resut = "";
                using (IDbConnection conn = IDbOpenConnection())
                {
                    var p = new DynamicParameters();
                    p.Add("@User_Code", User_Code);
                    p.Add("@Mode", obj.Mode);
                    p.Add("@Tvp_Table", ToDataTable(obj.lst).AsTableValuedParameter());
                    p.Add("@Result", "", DbType.String, ParameterDirection.Output);
                    conn.Query <string>(SP_hdInsertOrUpdateRuleData, p, commandType: CommandType.StoredProcedure).ToList();

                    resut = p.Get <string>("@Result");
                }
                return(resut);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }