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; } }
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)); } }
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; } }