コード例 #1
0
        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);
        }