public JObject GetScripts(HttpContext context) { JObject resultObj = new JObject(); try { Press3.BusinessRulesLayer.Scripts ScriptObj = new Press3.BusinessRulesLayer.Scripts(); resultObj = ScriptObj.GetScripts(MyConfig.MyConnectionString, accountId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject GetScriptsSectionsTopics(HttpContext context) { JObject resultObj = new JObject(); string script = context.Request["data"]; try { Press3.BusinessRulesLayer.Scripts ScriptObj = new Press3.BusinessRulesLayer.Scripts(); resultObj = ScriptObj.GetScriptsSectionsTopics(MyConfig.MyConnectionString, Convert.ToInt32(context.Request["skillGroupId"]), Convert.ToInt32(context.Request["scriptId"]), Convert.ToInt32(context.Request["sectionId"]), accountId, Convert.ToInt32(context.Request["mode"])); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject Update(HttpContext context) { JObject resultObj = new JObject(); string script = context.Request["data"]; try { Press3.BusinessRulesLayer.Scripts ScriptObj = new Press3.BusinessRulesLayer.Scripts(); resultObj = ScriptObj.Update(MyConfig.MyConnectionString, script, accountId, agentId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject ViewScripts(HttpContext context) { JObject resultObj = new JObject(); int scriptId = Convert.ToInt32(context.Request["scriptId"]); try { Press3.BusinessRulesLayer.Scripts scriptObj = new Press3.BusinessRulesLayer.Scripts(); resultObj = scriptObj.ViewScript(MyConfig.MyConnectionString, accountId, scriptId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject Script(HttpContext context) { JObject resultObj = new JObject(); string scriptTitle = context.Request["scriptTitle"]; try { Press3.BusinessRulesLayer.Scripts ScriptObj = new Press3.BusinessRulesLayer.Scripts(); resultObj = ScriptObj.Script(MyConfig.MyConnectionString, accountId, scriptTitle); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject DeleteTopic(HttpContext context) { JObject resultObj = new JObject(); int sectionId = Convert.ToInt32(context.Request["sectionId"]); int topicId = Convert.ToInt32(context.Request["topicId"]); try { Press3.BusinessRulesLayer.Scripts ScriptObj = new Press3.BusinessRulesLayer.Scripts(); resultObj = ScriptObj.DeleteTopic(MyConfig.MyConnectionString, accountId, sectionId, topicId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }
public JObject UploadExcelSections(HttpContext context) { JObject resultObj = new JObject(); string fileName = context.Request["path"].ToString(); string xlSheetData = context.Request["semidata"].ToString(); string header = context.Request["header"]; string scriptTitle = context.Request["scriptTitle"]; int skillGroupId = Convert.ToInt32(context.Request["skillGroupId"]); int check = Convert.ToInt32(context.Request["check"]); string excelUploadPath = HttpContext.Current.Server.MapPath("~/ScriptFileUpload/"); try { Press3.BusinessRulesLayer.Scripts ScriptObj = new Press3.BusinessRulesLayer.Scripts(); resultObj = ScriptObj.UploadExcelSections(MyConfig.MyConnectionString, excelUploadPath, fileName, xlSheetData, header, scriptTitle, skillGroupId, check, accountId, agentId); } catch (Exception ex) { Logger.Error(ex.ToString()); } return(resultObj); }