LAYUI版增加 成本项目固定分配率 成本项目分配标准 基础资料列表和编辑页面
81个文件已修改
13个文件已添加
6409 ■■■■■ 已修改文件
APSM/app.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/BLL.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/BLL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/DAL.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/DAL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/DAL.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/DAL.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/DAL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/基础资料/公用基础资料/ClsGy_CostItemAverageType_Ctl_2.cs 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/基础资料/公用基础资料/ClsGy_CostItemFixRate_Ctl_2.cs 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Kanban/app.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/app.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES/app.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/Model.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/基础资料/ClsGy_CostItemFixRate_Model_2.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/基础资料/ClsGy_Gy_CostItemAverageType_Model_2.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
NETERPNoWin/app.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Control/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Control/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Control/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Control/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/obj/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/obj/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SelM/app.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/WarM.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/app.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/libman.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_CarTypeController.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_CostItemAverageTypeController.cs 836 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_CostItemFixRateController.cs 836 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile6.pubxml.user 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile7.pubxml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile7.pubxml.user 522 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml.user 561 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Scripts/jquery.signalR-2.2.2.js 2958 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Scripts/jquery.signalR-2.2.2.min.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/packages.config 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WorkM/app.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
APSM/app.config
@@ -18,6 +18,14 @@
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
BLL/bin/Release/BLL.dll
Binary files differ
BLL/bin/Release/BLL.pdb
Binary files differ
BLL/bin/Release/DAL.dll
Binary files differ
BLL/bin/Release/DAL.pdb
Binary files differ
BLL/bin/Release/DBUtility.dll
Binary files differ
BLL/bin/Release/DBUtility.pdb
Binary files differ
BLL/bin/Release/Model.dll
Binary files differ
BLL/bin/Release/Model.pdb
Binary files differ
BLL/bin/Release/Pub_Class.dll
Binary files differ
BLL/bin/Release/Pub_Class.pdb
Binary files differ
BLL/bin/Release/Pub_Control.dll
Binary files differ
BLL/bin/Release/Pub_Control.pdb
Binary files differ
BLL/bin/Release/SQLHelper.dll
Binary files differ
BLL/bin/Release/SQLHelper.pdb
Binary files differ
DAL/DAL.csproj
@@ -86,6 +86,8 @@
    <Compile Include="MES\ClsSc_MESStopRestoreWorkBill.cs" />
    <Compile Include="WLGL\ClsCg_CarTrajectoryBill.cs" />
    <Compile Include="仓库管理\小车锁定\ClsKf_TrolleyPositionBill.cs" />
    <Compile Include="基础资料\公用基础资料\ClsGy_CostItemAverageType_Ctl_2.cs" />
    <Compile Include="基础资料\公用基础资料\ClsGy_CostItemFixRate_Ctl_2.cs" />
    <Compile Include="基础资料\公用基础资料\ClsGy_CostCenter_Ctl_2.cs" />
    <Compile Include="基础资料\公用基础资料\ClsGy_CostItem_Ctl_2.cs" />
    <Compile Include="基础资料\公用基础资料\ClsGy_Driver_Ctl.cs" />
DAL/bin/Release/DAL.dll
Binary files differ
DAL/bin/Release/DAL.pdb
Binary files differ
DAL/bin/Release/DBUtility.dll
Binary files differ
DAL/bin/Release/DBUtility.pdb
Binary files differ
DAL/bin/Release/Model.dll
Binary files differ
DAL/bin/Release/Model.pdb
Binary files differ
DAL/bin/Release/Pub_Class.dll
Binary files differ
DAL/bin/Release/Pub_Class.pdb
Binary files differ
DAL/bin/Release/Pub_Control.dll
Binary files differ
DAL/bin/Release/Pub_Control.pdb
Binary files differ
DAL/bin/Release/SQLHelper.dll
Binary files differ
DAL/bin/Release/SQLHelper.pdb
Binary files differ
DAL/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/ClsGy_CostItemAverageType_Ctl_2.cs
New file
@@ -0,0 +1,116 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public class ClsGy_CostItemAverageType_Ctl_2 : DBUtility.ClsGy_Base_Ctl
    {
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        //原代码 ç”¨äºŽ æ›¿æ¢å­é¡¹ç›®
        public string HOldNumber;
        public Model.ClsGy_Gy_CostItemAverageType_Model_2 oModel = new Model.ClsGy_Gy_CostItemAverageType_Model_2();
        //新增
        public override bool AddNew(ref string sReturn)
        {
            try
            {
                oCn.BeginTran();
                oCn.RunProc($@"
                    INSERT INTO {MvarItemKey} (HNumber, HName, HShortNumber, HParentID, HLevel, HEndFlag,
                    HStopflag, HRemark, HHelpCode, HUseFlag, HMakeTime, HMakeEmp, HUSEORGID,
                    HCREATEORGID,HCostItemID,HAverageTypeID,HWIPFlag,HProcName,HFixRate)
                    VALUES ('{oModel.HNumber}', '{oModel.HName}', '{oModel.HShortNumber}',
                    '{oModel.HParentID}', '{oModel.HLevel}', '{oModel.HEndFlag}',
                    '{oModel.HStopflag}', '{oModel.HRemark}', '{oModel.HHelpCode}',
                    '{oModel.HUseFlag}', getdate(), '{oModel.HMakeEmp}',
                    '{oModel.HUSEORGID}', '{oModel.HCREATEORGID}', '{oModel.HCostItemID}', '{oModel.HAverageTypeID}',
                    '{oModel.HWIPFlag}', '{oModel.HProcName}', '{oModel.HFixRate}')
                ", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //修改
        public override bool ModifyByID(Int64 sItemID, ref string sReturn)
        {
            try
            {
                oCn.BeginTran();
                oCn.RunProc($@"
                UPDATE {MvarItemKey} SET
                HNumber='{oModel.HNumber}',
                HName='{oModel.HName}',
                HShortNumber='{oModel.HShortNumber}',
                HParentID='{oModel.HParentID}',
                HLevel='{oModel.HLevel}',
                HEndFlag='{oModel.HEndFlag}',
                HStopflag='{oModel.HStopflag}',
                HRemark='{oModel.HRemark}',
                HHelpCode='{oModel.HHelpCode}',
                HUseFlag='{oModel.HUseFlag}',
                HModifyEmp='{oModel.HModifyEmp}',
                HModifyTime=getdate(),
                HUSEORGID='{oModel.HUSEORGID}',
                HCostItemID = '{oModel.HCostItemID}',
                HAverageTypeID= '{oModel.HAverageTypeID}',
                HWIPFlag ='{oModel.HWIPFlag}',
                HProcName = '{oModel.HProcName}',
                HFixRate = '{oModel.HFixRate}',
                HCREATEORGID= '{oModel.HCREATEORGID}'
                WHERE HItemID='{oModel.HItemID}'
                ", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                // oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将上级 ä¸ºéžæœ«çº§
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                //
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //根据代码判断信息
        public override bool HavParentCode(string sCode, Int64 sItemID)
        {
            DataSet DS;
            try
            {
                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count == 0)
                    return false;
                else
                {
                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]);
                    return true;
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //构造函数
        public ClsGy_CostItemAverageType_Ctl_2()
        {
            MvarItemKey = "Gy_CostItemAverageType_1";
            MvarReportTitle = "成本项目分配标准";
            oModel = new Model.ClsGy_Gy_CostItemAverageType_Model_2();
        }
    }
}
DAL/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/ClsGy_CostItemFixRate_Ctl_2.cs
New file
@@ -0,0 +1,113 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public class ClsGy_CostItemFixRate_Ctl_2 : DBUtility.ClsGy_Base_Ctl
    {
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        //原代码 ç”¨äºŽ æ›¿æ¢å­é¡¹ç›®
        public string HOldNumber;
        public Model.ClsGy_CostItemFixRate_Model_2 oModel = new Model.ClsGy_CostItemFixRate_Model_2();
        //新增
        public override bool AddNew(ref string sReturn)
        {
            try
            {
                oCn.BeginTran();
                oCn.RunProc($@"
                    INSERT INTO {MvarItemKey} (HNumber, HName, HShortNumber, HParentID, HLevel, HEndFlag,
                    HStopflag, HRemark, HHelpCode, HUseFlag, HMakeTime, HMakeEmp, HUSEORGID,
                    HCREATEORGID,HCostItemID,HFixRate,HCountRemark,HProcName)
                    VALUES ('{oModel.HNumber}', '{oModel.HName}', '{oModel.HShortNumber}',
                    '{oModel.HParentID}', '{oModel.HLevel}', '{oModel.HEndFlag}',
                    '{oModel.HStopflag}', '{oModel.HRemark}', '{oModel.HHelpCode}',
                    '{oModel.HUseFlag}', getdate(), '{oModel.HMakeEmp}',
                    '{oModel.HUSEORGID}', '{oModel.HCREATEORGID}', '{oModel.HCostItemID}', '{oModel.HFixRate}', '{oModel.HCountRemark}', '{oModel.HProcName}')
                ", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //修改
        public override bool ModifyByID(Int64 sItemID, ref string sReturn)
        {
            try
            {
                oCn.BeginTran();
                oCn.RunProc($@"
                UPDATE {MvarItemKey} SET
                HNumber='{oModel.HNumber}',
                HName='{oModel.HName}',
                HShortNumber='{oModel.HShortNumber}',
                HParentID='{oModel.HParentID}',
                HLevel='{oModel.HLevel}',
                HEndFlag='{oModel.HEndFlag}',
                HStopflag='{oModel.HStopflag}',
                HRemark='{oModel.HRemark}',
                HHelpCode='{oModel.HHelpCode}',
                HUseFlag='{oModel.HUseFlag}',
                HModifyEmp='{oModel.HModifyEmp}',
                HModifyTime=getdate(),
                HUSEORGID='{oModel.HUSEORGID}',
                HCostItemID='{oModel.HCostItemID}',
                HFixRate ='{oModel.HFixRate}',
                HCountRemark ='{oModel.HCountRemark}',
                HProcName='{oModel.HProcName}',
                HCREATEORGID= '{oModel.HCREATEORGID}'
                WHERE HItemID='{oModel.HItemID}'
                ", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                // oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将上级 ä¸ºéžæœ«çº§
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                //
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //根据代码判断信息
        public override bool HavParentCode(string sCode, Int64 sItemID)
        {
            DataSet DS;
            try
            {
                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count == 0)
                    return false;
                else
                {
                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]);
                    return true;
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //构造函数
        public ClsGy_CostItemFixRate_Ctl_2()
        {
            MvarItemKey = "Gy_CostItemFixRate";
            MvarReportTitle = "成本项目固定分配率";
            oModel = new Model.ClsGy_CostItemFixRate_Model_2();
        }
    }
}
DBUtility/bin/Release/DBUtility.dll
Binary files differ
DBUtility/bin/Release/DBUtility.pdb
Binary files differ
DBUtility/bin/Release/Pub_Class.dll
Binary files differ
DBUtility/bin/Release/Pub_Class.pdb
Binary files differ
DBUtility/bin/Release/Pub_Control.dll
Binary files differ
DBUtility/bin/Release/Pub_Control.pdb
Binary files differ
DBUtility/bin/Release/SQLHelper.dll
Binary files differ
DBUtility/bin/Release/SQLHelper.pdb
Binary files differ
DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache
Binary files differ
DBUtility/obj/Release/DBUtility.dll
Binary files differ
DBUtility/obj/Release/DBUtility.pdb
Binary files differ
Kanban/app.config
@@ -18,6 +18,14 @@
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
LMES/app.config
@@ -19,6 +19,14 @@
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
MES/app.config
@@ -15,6 +15,14 @@
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Model/Model.csproj
@@ -106,6 +106,8 @@
    <Compile Include="仓库管理\ClsKf_TrolleyPositionBillSub.cs" />
    <Compile Include="基础资料\其他基础资料\ClsGy_PurPrice_Model.cs" />
    <Compile Include="基础资料\其他基础资料\ClsGy_MatePrice_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_Gy_CostItemAverageType_Model_2.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_CostItemFixRate_Model_2.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_CostCenter_Model_2.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_CostItem_Model_2.cs" />
    <Compile Include="基础资料\基础资料\ClsCg_ContractTransportBillSub.cs" />
Model/bin/Release/DBUtility.dll
Binary files differ
Model/bin/Release/DBUtility.pdb
Binary files differ
Model/bin/Release/Model.dll
Binary files differ
Model/bin/Release/Model.pdb
Binary files differ
Model/bin/Release/Pub_Class.dll
Binary files differ
Model/bin/Release/Pub_Class.pdb
Binary files differ
Model/bin/Release/Pub_Control.dll
Binary files differ
Model/bin/Release/Pub_Control.pdb
Binary files differ
Model/bin/Release/SQLHelper.dll
Binary files differ
Model/bin/Release/SQLHelper.pdb
Binary files differ
Model/obj/Release/Model.csproj.AssemblyReference.cache
Binary files differ
Model/obj/Release/Model.dll
Binary files differ
Model/obj/Release/Model.pdb
Binary files differ
Model/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/ClsGy_CostItemFixRate_Model_2.cs
New file
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsGy_CostItemFixRate_Model_2
    {
        public long HItemID { get; set; }
        public string HNumber { get; set; }
        public string HHelpCode { get; set; }
        public string HName { get; set; }
        public string HShortNumber { get; set; }
        public bool HEndFlag { get; set; }
        public bool HStopflag { get; set; }
        public string HRemark { get; set; }
        public long HLevel { get; set; }
        public long HParentID { get; set; }
        public string HModel { get; set; }
        public long HUnitID { get; set; }
        public string HUnitNumber { get; set; }
        public string HUnitName { get; set; }
        public string HUseFlag { get; set; } = "未使用";
        public long HEntryID { get; set; }
        public string HMakeEmp { get; set; }         // varchar(100)    //创建人
        public string HMakeTime { get; set; }        // datetime        //创建日期(getdate())
        public string HCheckEmp { get; set; }        // varchar(100)    //审核人
        public string HCheckTime { get; set; }       // datetime        //审核日期
        public string HModifyEmp { get; set; }       // varchar(100)    //修改人
        public string HModifyTime { get; set; }      // datetime        //修改日期
        public string HStopEmp { get; set; }         // varchar(100)    //禁用人
        public string HStopTime { get; set; }        // datetime        //禁用日期
        public Int64 HUSEORGID { get; set; }         // int          //使用组织(Xt_ORGANIZATIONS)
        public Int64 HCREATEORGID { get; set; }      // int          //创建组织(Xt_ORGANIZATIONS)
        public long HInterID { get; set; }
        public string HModClass { get; set; }
        public string HKey { get; set; }
        public string HCaption { get; set; }
        public string HValue { get; set; }
        public bool HReadonly { get; set; }
        public string HExplanation { get; set; }
        public  int HCostItemID  { get; set; }
        public decimal  HFixRate { get; set; }
        public string HCountRemark   {get;  set; }
        public string HProcName     { get; set; }
    }
}
Model/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/ClsGy_Gy_CostItemAverageType_Model_2.cs
New file
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsGy_Gy_CostItemAverageType_Model_2
    {
        public long HItemID { get; set; }
        public string HNumber { get; set; }
        public string HHelpCode { get; set; }
        public string HName { get; set; }
        public string HShortNumber { get; set; }
        public bool HEndFlag { get; set; }
        public bool HStopflag { get; set; }
        public string HRemark { get; set; }
        public long HLevel { get; set; }
        public long HParentID { get; set; }
        public string HModel { get; set; }
        public long HUnitID { get; set; }
        public string HUnitNumber { get; set; }
        public string HUnitName { get; set; }
        public string HUseFlag { get; set; } = "未使用";
        public long HEntryID { get; set; }
        public string HMakeEmp { get; set; }         // varchar(100)    //创建人
        public string HMakeTime { get; set; }        // datetime        //创建日期(getdate())
        public string HCheckEmp { get; set; }        // varchar(100)    //审核人
        public string HCheckTime { get; set; }       // datetime        //审核日期
        public string HModifyEmp { get; set; }       // varchar(100)    //修改人
        public string HModifyTime { get; set; }      // datetime        //修改日期
        public string HStopEmp { get; set; }         // varchar(100)    //禁用人
        public string HStopTime { get; set; }        // datetime        //禁用日期
        public Int64 HUSEORGID { get; set; }         // int          //使用组织(Xt_ORGANIZATIONS)
        public Int64 HCREATEORGID { get; set; }      // int          //创建组织(Xt_ORGANIZATIONS)
        public long HInterID { get; set; }
        public string HModClass { get; set; }
        public string HKey { get; set; }
        public string HCaption { get; set; }
        public string HValue { get; set; }
        public bool HReadonly { get; set; }
        public string HExplanation { get; set; }
        public int HCostItemID { get; set; }
        public decimal HFixRate { get; set; }
        public string HCountRemark { get; set; }
        public string HProcName { get; set; }
        public  int HAverageTypeID  { get; set; }
        public bool HWIPFlag { get; set; }
    }
}
NETERPNoWin/app.config
@@ -19,6 +19,14 @@
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Pub_Class/bin/Release/Pub_Class.dll
Binary files differ
Pub_Class/bin/Release/Pub_Class.pdb
Binary files differ
Pub_Control/bin/Release/Pub_Class.dll
Binary files differ
Pub_Control/bin/Release/Pub_Class.pdb
Binary files differ
Pub_Control/bin/Release/Pub_Control.dll
Binary files differ
Pub_Control/bin/Release/Pub_Control.pdb
Binary files differ
SQLHelper/bin/Release/Pub_Class.dll
Binary files differ
SQLHelper/bin/Release/Pub_Class.pdb
Binary files differ
SQLHelper/bin/Release/SQLHelper.dll
Binary files differ
SQLHelper/bin/Release/SQLHelper.pdb
Binary files differ
SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache
Binary files differ
SQLHelper/obj/Release/SQLHelper.dll
Binary files differ
SQLHelper/obj/Release/SQLHelper.pdb
Binary files differ
SelM/app.config
@@ -14,6 +14,14 @@
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
WarM/WarM.csproj
@@ -1314,6 +1314,7 @@
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
    <None Include="libman.json" />
    <None Include="packages.config" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
WarM/app.config
@@ -21,6 +21,14 @@
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
WarM/libman.json
New file
@@ -0,0 +1,5 @@
{
  "version": "1.0",
  "defaultProvider": "cdnjs",
  "libraries": []
}
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CarTypeController.cs
@@ -47,7 +47,7 @@
                long HItemID = list[0].HItemID;
                string HShortNumber = list[0].HShortNumber;
                long HParentID = list[0].HParentID;
                int HLevel = ClsPub.GetLevel(list[0].HNumber.Trim());
                int HLevel = list[0].HLevel;
                int HEndFlag = list[0].HEndFlag ? 1 : 0;
                string HUseFlag = list[0].HUseFlag;
@@ -234,14 +234,7 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "该车型已审核,不可编辑!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CostItemAverageTypeController.cs
New file
@@ -0,0 +1,836 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
using WebAPI.Service;
namespace WebAPI.Controllers.基础资料.基础资料
{
    public class Gy_CostItemAverageTypeController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region  æˆæœ¬é¡¹ç›®å›ºå®šåˆ†æ ‡å‡†  æŸ¥è¯¢,审核,反审核,禁用,反禁用
        /// <summary>
        /// ä¾›åº”商分类  æŸ¥è¯¢
        /// </summary>
        /// <param name="sWhere"></param>
        /// <param name="user"></param>Gy_CostItemAverageType/Gy_CostItemAverageTypeList
        /// <returns></returns>
        [Route("Gy_CostItemAverageType/Gy_CostItemAverageTypeList")]
        [HttpGet]
        public object Gy_CostItemList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_CostItemAverageType_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql1 = "SELECT * from h_v_Gy_CostItemAverageType_1 where 1 = 1";
                string sql = sql1 + sWhere + " order by æˆæœ¬é¡¹ç›®åˆ†é…æ ‡å‡†ä»£ç ";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostItemAverageType_1");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨ å®¡æ ¸ã€åå®¡æ ¸
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_CostItemAverageType/AuditGy_CostItemAverageType")]
        [HttpGet]
        public object AuditGy_CostItemAverageType(int HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_CostItemAverageType_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType_1 where HItemID=" + HInterID, "Gy_CostItemAverageType_1");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsAudit == 0)  //审核判断
                {
                    //审核前控制=========================================
                    string sql1 = "exec h_p_Gy_CostItemAverageType_BeforeCheckCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemAverageType_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.RunProc("update Gy_CostItemAverageType_1 set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    //审核后控制=========================================
                    string sql2 = "exec h_p_Gy_CostItemAverageType_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemAverageType_AfterCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_Gy_CostItemAverageType_BeforeUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemAverageType_BeforeUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.RunProc("update Gy_CostItemAverageType_1 set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    //反审核后控制=========================================
                    string sql2 = "exec h_p_Gy_CostItemAverageType_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemAverageType_AfterUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// æˆæœ¬é¡¹ç›®å›ºå®šåˆ†æ ‡å‡†å›ºå®šåˆ†é…çއ åˆ é™¤åŠŸèƒ½
        /// </summary>
        /// <returns></returns>
        [Route("DeltetGy_CostItemAverageType")]
        [HttpGet]
        public object DeltetGy_CostItemAverageType(string HItemID, string user)
        {
            DataSet ds;
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log("Gy_CostItemAverageType_Delete", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (string.IsNullOrWhiteSpace(HItemID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HItemID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType_1  where HItemID=" + HItemID, "Gy_CostItemAverageType_1");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已禁用!不能进行删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //删除前控制=========================================
                string sql1 = "exec h_p_Gy_CostItemAverageType_BeforeDelCtrl " + HItemID + ",'" + user + "'";
                ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemAverageType_BeforeDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                //==================================================================================
                oCN.RunProc("delete Gy_CostItemAverageType_1  where HItemID=" + HItemID);
                //删除后控制=========================================
                string sql2 = "exec h_p_Gy_CostItemAverageType_AfterDelCtrl " + HItemID + ",'" + user + "'";
                ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemAverageType_AfterDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                //==================================================================================
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "数据删除成功!";
                objJsonResult.data = null;
                return objJsonResult; ;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¦ç”¨
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨ ç¦ç”¨ã€åç¦ç”¨
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsStop">禁用(0),反禁用(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_CostItemAverageType/StopGy_CostItemAverageType")]
        [HttpGet]
        public object StopGy_CostItemAverageType(int HInterID, int IsStop, string CurUserName)
        {
            try
            {
                //禁用权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_CostItemAverageType_Close", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "禁用失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType_1 where HItemID=" + HInterID, "Gy_CostItemAverageType_1");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsStop == 0)  //禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已禁用!不能再次禁用!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsStop == 1) //反禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未禁用!不需要反禁用!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsStop == 0)  //禁用判断
                {
                    //禁用前控制=========================================
                    string sql1 = "exec h_p_Gy_CostItemAverageType_BeforeStopCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemAverageType_BeforeStopCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "禁用失败!原因:禁用前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.RunProc("update Gy_CostItemAverageType_1 set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    //禁用后控制=========================================
                    string sql2 = "exec h_p_Gy_CostItemAverageType_AfterStopCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemAverageType_AfterStopCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "禁用失败!原因:禁用后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "禁用成功";
                    objJsonResult.data = null;
                }
                if (IsStop == 1) //反禁用判断
                {
                    //反禁用前控制=========================================
                    string sql1 = "exec h_p_Gy_CostItemAverageType_BeforeUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemAverageType_BeforeUnStopCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反禁用失败!原因:反禁用前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.RunProc("update Gy_CostItemAverageType_1 set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    //反禁用后控制=========================================
                    string sql2 = "exec h_p_Gy_CostItemAverageType_AfterUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemAverageType_AfterUnStopCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反禁用失败!原因:反禁用后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反禁用成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "禁用失败或者反禁用失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ä¿å­˜ æˆæœ¬é¡¹ç›®å›ºå®šåˆ†æ ‡å‡†
        /// <summary>
        /// ä¿å­˜æˆæœ¬é¡¹ç›®å›ºå®šåˆ†æ ‡å‡†
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("Gy_CostItemAverageType/SaveGy_CostItemAverageType")]
        [HttpPost]
        public object SaveGy_CostItemAverageType([FromBody] JObject msg)
        {
            DataSet ds;
            var _value = msg["msg"].ToString();
            string msg3 = _value.ToString();
            string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg1 = sArray[0].ToString();
            string msg2 = sArray[1].ToString();
            //查看权限
            if (!DBUtility.ClsPub.Security_Log("Gy_CostItemAverageType_Edit", 1, false, msg2))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无保存权限!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            Int64 HItemID = 0;
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsGy_CostItemAverageType_Ctl_2 oBill = new DAL.ClsGy_CostItemAverageType_Ctl_2();
                List<Model.ClsGy_Gy_CostItemAverageType_Model_2> lsmain = new List<Model.ClsGy_Gy_CostItemAverageType_Model_2>();
                msg1 = msg1.Replace("\\", "");
                msg1 = msg1.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_CostItemAverageType(msg1);
                foreach (Model.ClsGy_Gy_CostItemAverageType_Model_2 oItem in lsmain)
                {
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!成本代码不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (oItem.HName.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!成本名称不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //查询数据中是否存在重复代码
                    ds = oCN.RunProcReturn("select * from  Gy_CostItemAverageType_1 where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostItemAverageType_1");
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!成本代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //新增时判断
                    if (oItem.HItemID == 0)
                    {
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "保存失败!成本代码重复!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //检查父级是否存在
                        string sParent;
                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
                        if (sParent.Trim() == "")
                        {
                            oBill.oModel.HParentID = 0;
                        }
                        else
                        {
                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
                            {
                                oBill.oModel.HParentID = oBill.oModel.HItemID;
                            }
                            else
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "保存失败!上级代码不存在或被禁用!";
                                objJsonResult.data = 1;
                                return objJsonResult;
                            }
                        }
                    }
                    else//编辑时判断
                    {
                        //已审核不允许修改
                        DataSet dss;
                        dss = oCN.RunProcReturn("select * from Gy_CostItemAverageType_1 where HItemID=" + oItem.HItemID, "Gy_CostItemAverageType_1");
                        //判断是否可编辑
                        if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据状态已经审核,不允许修改!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //检查父级是否存在
                        string sParent;
                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
                        if (sParent.Trim() == "")
                        {
                            oBill.oModel.HParentID = 0;
                        }
                        else
                        {
                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
                            {
                                oBill.oModel.HParentID = oBill.oModel.HItemID;
                            }
                            else
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "保存失败!上级代码不存在或被禁用!";
                                objJsonResult.data = 1;
                                return objJsonResult;
                            }
                        }
                    }
                    //得到短代码
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItem.HShortNumber = sShortNumber;//短代码
                    oItem.HEndFlag = true;//末级标志
                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级
                    oItem.HMakeEmp = msg2;//创建人
                    oBill.oModel = oItem;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.oModel.HItemID == 0)
                {
                    bResult = oBill.AddNew(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    oBill.oModel.HModifyEmp = msg2;
                    bResult = oBill.ModifyByID(oBill.oModel.HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¼–辑成本项目固定分标准
        [Route("Gy_CostItemAverageType/Gety_CostItemFixRate")]
        [HttpGet]
        public object GetGy_CarDetail(int HID)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql1 = $@"select * from h_v_Gy_CostItemAverageType_1 where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostItemAverageType_1");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CostItemFixRateController.cs
New file
@@ -0,0 +1,836 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
using WebAPI.Service;
namespace WebAPI.Controllers.基础资料.基础资料
{
    public class Gy_CostItemFixRateController: ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region  æˆæœ¬é¡¹ç›®å›ºå®šåˆ†é…çއ  æŸ¥è¯¢,审核,反审核,禁用,反禁用
        /// <summary>
        /// ä¾›åº”商分类  æŸ¥è¯¢
        /// </summary>
        /// <param name="sWhere"></param>
        /// <param name="user"></param>Gy_CostItemFixRate/Gy_CostItemFixRateList
        /// <returns></returns>
        [Route("Gy_CostItemFixRate/Gy_CostItemFixRateList")]
        [HttpGet]
        public object Gy_CostItemList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_CostItemFixRate_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql1 = "SELECT * from h_v_Gy_CostItemFixRate where 1 = 1";
                string sql = sql1 + sWhere + " order by æˆæœ¬é¡¹ç›®å›ºå®šåˆ†é…çŽ‡ä»£ç ";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostItemFixRate");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨ å®¡æ ¸ã€åå®¡æ ¸
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_CostItemFixRate/AuditGy_CostItemFixRate")]
        [HttpGet]
        public object AuditGy_CostItemFixRate(int HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_CostItemFixRate_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostItemFixRate where HItemID=" + HInterID, "Gy_CostItemFixRate");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsAudit == 0)  //审核判断
                {
                    //审核前控制=========================================
                    string sql1 = "exec h_p_Gy_CostItemFixRate_BeforeCheckCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemFixRate_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.RunProc("update Gy_CostItemFixRate set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    //审核后控制=========================================
                    string sql2 = "exec h_p_Gy_CostItemFixRate_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemFixRate_AfterCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_Gy_CostItemFixRate_BeforeUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemFixRate_BeforeUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.RunProc("update Gy_CostItemFixRate set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    //反审核后控制=========================================
                    string sql2 = "exec h_p_Gy_CostItemFixRate_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemFixRate_AfterUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// æˆæœ¬é¡¹ç›®å›ºå®šåˆ†é…çŽ‡å›ºå®šåˆ†é…çŽ‡ åˆ é™¤åŠŸèƒ½
        /// </summary>
        /// <returns></returns>
        [Route("DeltetGy_CostItemFixRate")]
        [HttpGet]
        public object DeltetGy_CostItemFixRate(string HItemID, string user)
        {
            DataSet ds;
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log("Gy_CostItemFixRate_Delete", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (string.IsNullOrWhiteSpace(HItemID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HItemID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_CostItemFixRate  where HItemID=" + HItemID, "Gy_CostItemFixRate");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已禁用!不能进行删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //删除前控制=========================================
                string sql1 = "exec h_p_Gy_ItemMoney_BeforeDelCtrl " + HItemID + ",'" + user + "'";
                ds = oCN.RunProcReturn(sql1, "h_p_Gy_ItemMoney_BeforeDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                //==================================================================================
                oCN.RunProc("delete Gy_CostItemFixRate  where HItemID=" + HItemID);
                //删除后控制=========================================
                string sql2 = "exec h_p_Gy_ItemMoney_AfterDelCtrl " + HItemID + ",'" + user + "'";
                ds = oCN.RunProcReturn(sql2, "h_p_Gy_ItemMoney_AfterDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                //==================================================================================
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "数据删除成功!";
                objJsonResult.data = null;
                return objJsonResult; ;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¦ç”¨
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨ ç¦ç”¨ã€åç¦ç”¨
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsStop">禁用(0),反禁用(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_CostItemFixRate/StopGy_CostItemFixRate")]
        [HttpGet]
        public object StopGy_CostItemFixRate(int HInterID, int IsStop, string CurUserName)
        {
            try
            {
                //禁用权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_CostItemFixRate_Close", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "禁用失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostItemFixRate where HItemID=" + HInterID, "Gy_CostItemFixRate");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsStop == 0)  //禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已禁用!不能再次禁用!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsStop == 1) //反禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未禁用!不需要反禁用!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsStop == 0)  //禁用判断
                {
                    //禁用前控制=========================================
                    string sql1 = "exec h_p_Gy_CostItemFixRate_BeforeStopCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemFixRate_BeforeStopCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "禁用失败!原因:禁用前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.RunProc("update Gy_CostItemFixRate set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    //禁用后控制=========================================
                    string sql2 = "exec h_p_Gy_CostItemFixRate_AfterStopCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemFixRate_AfterStopCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "禁用失败!原因:禁用后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "禁用成功";
                    objJsonResult.data = null;
                }
                if (IsStop == 1) //反禁用判断
                {
                    //反禁用前控制=========================================
                    string sql1 = "exec h_p_Gy_CostItemFixRate_BeforeUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_CostItemFixRate_BeforeUnStopCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反禁用失败!原因:反禁用前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.RunProc("update Gy_CostItemFixRate set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    //反禁用后控制=========================================
                    string sql2 = "exec h_p_Gy_CostItemFixRate_AfterUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Gy_CostItemFixRate_AfterUnStopCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反禁用失败!原因:反禁用后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反禁用成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "禁用失败或者反禁用失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ä¿å­˜ æˆæœ¬é¡¹ç›®å›ºå®šåˆ†é…çއ
        /// <summary>
        /// ä¿å­˜æˆæœ¬é¡¹ç›®å›ºå®šåˆ†é…çއ
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("Gy_CostItemFixRate/SaveGy_CostItemFixRate")]
        [HttpPost]
        public object SaveGy_CostItemFixRate([FromBody] JObject msg)
        {
            DataSet ds;
            var _value = msg["msg"].ToString();
            string msg3 = _value.ToString();
            string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg1 = sArray[0].ToString();
            string msg2 = sArray[1].ToString();
            //查看权限
            if (!DBUtility.ClsPub.Security_Log("Gy_CostItemFixRate_Edit", 1, false, msg2))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无保存权限!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            Int64 HItemID = 0;
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsGy_CostItemFixRate_Ctl_2 oBill = new DAL.ClsGy_CostItemFixRate_Ctl_2();
                List<Model.ClsGy_CostItemFixRate_Model_2> lsmain = new List<Model.ClsGy_CostItemFixRate_Model_2>();
                msg1 = msg1.Replace("\\", "");
                msg1 = msg1.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_CostItemFixRate(msg1);
                foreach (Model.ClsGy_CostItemFixRate_Model_2 oItem in lsmain)
                {
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!成本代码不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (oItem.HName.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!成本名称不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //查询数据中是否存在重复代码
                    ds = oCN.RunProcReturn("select * from  Gy_CostItemFixRate where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostItemFixRate");
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!成本代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //新增时判断
                    if (oItem.HItemID == 0)
                    {
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "保存失败!成本代码重复!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //检查父级是否存在
                        string sParent;
                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
                        if (sParent.Trim() == "")
                        {
                            oBill.oModel.HParentID = 0;
                        }
                        else
                        {
                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
                            {
                                oBill.oModel.HParentID = oBill.oModel.HItemID;
                            }
                            else
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "保存失败!上级代码不存在或被禁用!";
                                objJsonResult.data = 1;
                                return objJsonResult;
                            }
                        }
                    }
                    else//编辑时判断
                    {
                        //已审核不允许修改
                        DataSet dss;
                        dss = oCN.RunProcReturn("select * from Gy_CostItemFixRate where HItemID=" + oItem.HItemID, "Gy_CostItemFixRate");
                        //判断是否可编辑
                        if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据状态已经审核,不允许修改!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //检查父级是否存在
                        string sParent;
                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
                        if (sParent.Trim() == "")
                        {
                            oBill.oModel.HParentID = 0;
                        }
                        else
                        {
                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
                            {
                                oBill.oModel.HParentID = oBill.oModel.HItemID;
                            }
                            else
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "保存失败!上级代码不存在或被禁用!";
                                objJsonResult.data = 1;
                                return objJsonResult;
                            }
                        }
                    }
                    //得到短代码
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItem.HShortNumber = sShortNumber;//短代码
                    oItem.HEndFlag = true;//末级标志
                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级
                    oItem.HMakeEmp = msg2;//创建人
                    oBill.oModel = oItem;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.oModel.HItemID == 0)
                {
                    bResult = oBill.AddNew(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    oBill.oModel.HModifyEmp = msg2;
                    bResult = oBill.ModifyByID(oBill.oModel.HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¼–辑成本项目固定分配率
        [Route("Gy_CostItemFixRate/Gety_CostItemFixRate")]
        [HttpGet]
        public object GetGy_CarDetail(int HID)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql1 = $@"select * from h_v_Gy_CostItemFixRate where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostItemFixRate");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/ListModels.cs
@@ -5429,5 +5429,31 @@
            return list;
        }
        /// <summary>
        /// æˆæœ¬åˆ†é…ç±»åž‹ååºåˆ—化
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsGy_CostItemFixRate_Model_2> getObjectByJson_Gy_CostItemFixRate(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsGy_CostItemFixRate_Model_2> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_CostItemFixRate_Model_2>>(jsonString);
            return list;
        }
        /// <summary>
        /// æˆæœ¬é¡¹ç›®åˆ†é…æ ‡å‡†ååºåˆ—化
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsGy_Gy_CostItemAverageType_Model_2> getObjectByJson_Gy_CostItemAverageType(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsGy_Gy_CostItemAverageType_Model_2> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_Gy_CostItemAverageType_Model_2>>(jsonString);
            return list;
        }
    }
WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user
@@ -5,16 +5,15 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <_PublishTargetUrl>D:\gz\网站发布\MES-WEB-API</_PublishTargetUrl>
    <History>True|2026-01-12T07:19:54.3717206Z;False|2026-01-12T15:17:17.3729576+08:00;True|2026-01-12T15:06:21.0862309+08:00;True|2026-01-12T15:05:12.9275744+08:00;True|2026-01-12T15:03:27.8176237+08:00;True|2026-01-12T14:49:27.5738671+08:00;True|2026-01-12T13:53:19.5855449+08:00;True|2026-01-12T13:38:48.5630901+08:00;True|2026-01-12T13:36:16.7827480+08:00;True|2026-01-12T13:11:13.0574812+08:00;True|2026-01-12T12:15:59.9874160+08:00;True|2026-01-12T11:28:11.2732011+08:00;True|2026-01-12T11:25:38.1085721+08:00;True|2026-01-12T11:20:56.4151816+08:00;True|2026-01-12T11:16:18.6890378+08:00;True|2026-01-12T10:21:18.4936159+08:00;True|2026-01-12T10:19:04.5140921+08:00;True|2026-01-12T10:12:29.5361934+08:00;True|2026-01-12T10:09:15.1808283+08:00;True|2026-01-12T10:06:57.1995205+08:00;True|2026-01-12T10:04:01.9541129+08:00;True|2026-01-12T10:00:35.3087230+08:00;True|2026-01-12T09:57:09.4993139+08:00;True|2026-01-12T09:56:03.1835848+08:00;True|2026-01-12T09:53:04.7564007+08:00;True|2026-01-12T09:51:52.2255672+08:00;True|2026-01-12T09:50:55.6467900+08:00;True|2026-01-12T09:48:40.7809221+08:00;True|2026-01-12T09:46:56.6322007+08:00;True|2026-01-12T09:45:02.7727778+08:00;True|2026-01-12T09:40:42.3093709+08:00;True|2026-01-12T09:37:57.6481305+08:00;True|2026-01-12T09:33:52.0030071+08:00;True|2026-01-12T09:28:28.3115742+08:00;True|2026-01-12T09:26:09.4986237+08:00;True|2026-01-12T09:15:22.9709305+08:00;True|2026-01-12T09:04:33.6006835+08:00;True|2026-01-12T09:02:26.0031140+08:00;True|2026-01-12T08:47:30.6112157+08:00;True|2026-01-12T08:39:51.8354905+08:00;False|2026-01-12T08:39:28.1520514+08:00;True|2026-01-09T12:19:00.1945481+08:00;True|2026-01-09T12:17:02.3797220+08:00;True|2026-01-09T12:15:15.5895935+08:00;True|2026-01-09T11:54:06.3559015+08:00;True|2026-01-09T11:46:20.0827712+08:00;True|2026-01-09T11:41:46.9419488+08:00;True|2026-01-09T11:31:33.9371218+08:00;True|2026-01-09T11:27:04.3293331+08:00;False|2026-01-09T11:26:35.7648277+08:00;True|2026-01-08T13:12:36.7702662+08:00;False|2026-01-08T13:12:15.5632570+08:00;True|2026-01-05T15:38:15.4194341+08:00;</History>
    <History>True|2026-01-27T01:41:11.9598463Z;True|2026-01-12T15:19:54.3717206+08:00;False|2026-01-12T15:17:17.3729576+08:00;True|2026-01-12T15:06:21.0862309+08:00;True|2026-01-12T15:05:12.9275744+08:00;True|2026-01-12T15:03:27.8176237+08:00;True|2026-01-12T14:49:27.5738671+08:00;True|2026-01-12T13:53:19.5855449+08:00;True|2026-01-12T13:38:48.5630901+08:00;True|2026-01-12T13:36:16.7827480+08:00;True|2026-01-12T13:11:13.0574812+08:00;True|2026-01-12T12:15:59.9874160+08:00;True|2026-01-12T11:28:11.2732011+08:00;True|2026-01-12T11:25:38.1085721+08:00;True|2026-01-12T11:20:56.4151816+08:00;True|2026-01-12T11:16:18.6890378+08:00;True|2026-01-12T10:21:18.4936159+08:00;True|2026-01-12T10:19:04.5140921+08:00;True|2026-01-12T10:12:29.5361934+08:00;True|2026-01-12T10:09:15.1808283+08:00;True|2026-01-12T10:06:57.1995205+08:00;True|2026-01-12T10:04:01.9541129+08:00;True|2026-01-12T10:00:35.3087230+08:00;True|2026-01-12T09:57:09.4993139+08:00;True|2026-01-12T09:56:03.1835848+08:00;True|2026-01-12T09:53:04.7564007+08:00;True|2026-01-12T09:51:52.2255672+08:00;True|2026-01-12T09:50:55.6467900+08:00;True|2026-01-12T09:48:40.7809221+08:00;True|2026-01-12T09:46:56.6322007+08:00;True|2026-01-12T09:45:02.7727778+08:00;True|2026-01-12T09:40:42.3093709+08:00;True|2026-01-12T09:37:57.6481305+08:00;True|2026-01-12T09:33:52.0030071+08:00;True|2026-01-12T09:28:28.3115742+08:00;True|2026-01-12T09:26:09.4986237+08:00;True|2026-01-12T09:15:22.9709305+08:00;True|2026-01-12T09:04:33.6006835+08:00;True|2026-01-12T09:02:26.0031140+08:00;True|2026-01-12T08:47:30.6112157+08:00;True|2026-01-12T08:39:51.8354905+08:00;False|2026-01-12T08:39:28.1520514+08:00;True|2026-01-09T12:19:00.1945481+08:00;True|2026-01-09T12:17:02.3797220+08:00;True|2026-01-09T12:15:15.5895935+08:00;True|2026-01-09T11:54:06.3559015+08:00;True|2026-01-09T11:46:20.0827712+08:00;True|2026-01-09T11:41:46.9419488+08:00;True|2026-01-09T11:31:33.9371218+08:00;True|2026-01-09T11:27:04.3293331+08:00;False|2026-01-09T11:26:35.7648277+08:00;True|2026-01-08T13:12:36.7702662+08:00;False|2026-01-08T13:12:15.5632570+08:00;True|2026-01-05T15:38:15.4194341+08:00;</History>
  </PropertyGroup>
  <ItemGroup>
    <File Include="apiapp.json">
      <publishTime>04/06/2023 15:57:02</publishTime>
      <publishTime>11/12/2025 10:43:48</publishTime>
      <!-- <publishTime>04/21/2025 11:46:17</publishTime> -->
    </File>
    <File Include="BarCodeTemplate/barCodeTemplateStorage.json">
      <publishTime>08/29/2025 08:34:20</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.EndpointUtil.dll">
      <publishTime>04/07/2020 16:33:48</publishTime>
@@ -50,33 +49,40 @@
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>01/12/2026 13:11:01</publishTime>
      <publishTime>01/27/2026 09:37:19</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>01/12/2026 13:11:01</publishTime>
      <publishTime>01/27/2026 09:37:19</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>01/12/2026 13:10:59</publishTime>
      <publishTime>01/27/2026 09:37:17</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>01/12/2026 13:10:59</publishTime>
      <publishTime>01/27/2026 09:37:17</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>01/05/2026 13:09:06</publishTime>
      <publishTime>01/26/2026 09:55:44</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>01/05/2026 13:09:06</publishTime>
      <publishTime>01/26/2026 09:55:44</publishTime>
    </File>
    <File Include="bin/Fleck.dll">
      <publishTime>04/22/2021 11:48:12</publishTime>
    </File>
    <File Include="bin/GetuiServerApiSDK.dll">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/GetuiServerApiSDK.dll.config">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/Google.ProtocolBuffers.dll">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.dll">
      <publishTime>03/22/2022 13:17:26</publishTime>
@@ -103,9 +109,7 @@
      <publishTime>05/09/2021 01:08:30</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/libgrpc_csharp_ext.x64.dylib">
      <publishTime>03/19/2022 07:38:44</publishTime>
@@ -113,25 +117,38 @@
    <File Include="bin/libgrpc_csharp_ext.x64.so">
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="bin/Microsoft.AspNet.SignalR.Core.dll">
      <publishTime>05/04/2017 02:25:34</publishTime>
    </File>
    <File Include="bin/Microsoft.AspNet.SignalR.SystemWeb.dll">
      <publishTime>05/04/2017 02:25:40</publishTime>
    </File>
    <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll">
      <publishTime>03/19/2015 01:02:50</publishTime>
    </File>
    <File Include="bin/Microsoft.CSharp.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.dll">
      <publishTime>01/18/2019 20:50:30</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.Host.SystemWeb.dll">
      <publishTime>01/18/2019 20:50:50</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.Security.dll">
      <publishTime>01/18/2019 20:51:10</publishTime>
    </File>
    <File Include="bin/Microsoft.Web.Infrastructure.dll">
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>01/05/2026 13:09:07</publishTime>
      <publishTime>01/27/2026 09:37:14</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>01/05/2026 13:09:07</publishTime>
      <publishTime>01/27/2026 09:37:14</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/Newtonsoft.Json.dll">
      <publishTime>03/08/2023 15:09:56</publishTime>
@@ -160,40 +177,38 @@
    <File Include="bin/NPOI.pdb">
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Owin.dll">
      <publishTime>11/13/2012 12:19:34</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>12/30/2025 08:03:28</publishTime>
      <publishTime>01/26/2026 09:55:42</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>12/30/2025 08:03:28</publishTime>
      <publishTime>01/26/2026 09:55:42</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>12/30/2025 08:03:29</publishTime>
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>12/30/2025 08:03:29</publishTime>
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>01/05/2026 13:03:17</publishTime>
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>01/05/2026 13:03:17</publishTime>
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.dll">
      <publishTime>12/29/2025 16:38:11</publishTime>
      <publishTime>01/19/2026 15:35:44</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.pdb">
      <publishTime>12/29/2025 16:38:11</publishTime>
      <publishTime>01/19/2026 15:35:44</publishTime>
    </File>
    <File Include="bin/System.Buffers.dll">
      <publishTime>07/19/2017 18:01:28</publishTime>
@@ -271,9 +286,7 @@
      <publishTime>11/28/2018 21:01:00</publishTime>
    </File>
    <File Include="bin/System.Web.Http.WebHost.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/System.Web.Mvc.dll">
      <publishTime>01/28/2015 12:02:18</publishTime>
@@ -306,29 +319,40 @@
      <publishTime>05/09/2023 10:43:40</publishTime>
    </File>
    <File Include="bin/TopSdk.dll">
      <publishTime>12/29/2025 16:38:11</publishTime>
      <publishTime>01/22/2026 16:36:48</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>12/29/2025 16:38:11</publishTime>
      <publishTime>01/22/2026 16:36:48</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>01/12/2026 15:19:49</publishTime>
      <publishTime>01/27/2026 09:41:06</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>01/12/2026 15:19:49</publishTime>
      <publishTime>01/27/2026 09:41:06</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>01/12/2026 15:19:53</publishTime>
      <publishTime>01/27/2026 09:41:10</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.AspNet.SignalR.Core.resources.dll">
      <publishTime>05/04/2017 02:34:10</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.AspNet.SignalR.SystemWeb.resources.dll">
      <publishTime>05/04/2017 02:34:16</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.Host.SystemWeb.resources.dll">
      <publishTime>01/18/2019 12:59:56</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.resources.dll">
      <publishTime>01/18/2019 12:59:58</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.Security.resources.dll">
      <publishTime>01/18/2019 13:00:00</publishTime>
    </File>
    <File Include="bin/zh-Hans/System.Net.Http.Formatting.resources.dll">
      <publishTime>11/29/2018 21:26:02</publishTime>
@@ -337,7 +361,6 @@
      <publishTime>11/29/2018 21:26:30</publishTime>
    </File>
    <File Include="Config/kdapi.config">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Content/bootstrap.css">
@@ -393,7 +416,6 @@
    </File>
    <File Include="Global.asax">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="grpc_csharp_ext.x64.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
@@ -402,9 +424,7 @@
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="Index.html">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="libgrpc_csharp_ext.x64.dylib">
      <publishTime>03/19/2022 07:38:44</publishTime>
@@ -413,17 +433,22 @@
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="libman.json">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="packages.config">
      <publishTime>12/29/2025 17:01:02</publishTime>
      <publishTime>01/27/2026 08:36:04</publishTime>
    </File>
    <File Include="Properties/PublishProfiles/JFAPI.pubxml.user">
      <publishTime>12/09/2025 08:11:33</publishTime>
    </File>
    <File Include="Scripts/jquery.signalR-2.2.2.js">
      <publishTime>01/27/2026 08:35:50</publishTime>
    </File>
    <File Include="Scripts/jquery.signalR-2.2.2.min.js">
      <publishTime>01/27/2026 08:35:50</publishTime>
    </File>
    <File Include="Template/barCodeTemplateStorage.json">
      <publishTime>11/12/2025 10:43:47</publishTime>
@@ -534,8 +559,7 @@
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>01/05/2026 15:38:14</publishTime>
      <publishTime>01/27/2026 09:41:11</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Properties/PublishProfiles/FolderProfile6.pubxml.user
@@ -4,7 +4,7 @@
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <History>True|2026-01-22T08:22:54.7532646Z;True|2026-01-22T15:20:35.8786912+08:00;True|2026-01-22T15:05:45.5847432+08:00;True|2026-01-22T14:30:51.3737117+08:00;True|2026-01-22T14:27:07.3723210+08:00;True|2026-01-22T14:15:47.5371528+08:00;True|2026-01-22T11:23:57.8496413+08:00;True|2026-01-22T11:21:57.8847886+08:00;False|2026-01-22T11:17:40.8281638+08:00;True|2026-01-22T11:07:36.5601512+08:00;True|2026-01-22T10:59:27.4506851+08:00;True|2026-01-22T10:32:38.7652468+08:00;True|2026-01-22T10:16:56.7567817+08:00;False|2026-01-22T10:12:28.3322522+08:00;True|2026-01-22T10:10:06.8615667+08:00;True|2026-01-22T09:43:12.7110339+08:00;True|2026-01-22T09:40:45.5823227+08:00;True|2026-01-22T09:31:34.0508221+08:00;True|2026-01-22T08:11:37.9818815+08:00;False|2026-01-22T08:11:04.8101514+08:00;True|2026-01-19T16:39:45.2711197+08:00;True|2026-01-19T16:21:02.6483395+08:00;False|2026-01-19T16:20:38.8982697+08:00;</History>
    <History>True|2026-01-26T06:49:52.2728583Z;True|2026-01-26T14:34:27.0802101+08:00;True|2026-01-26T14:32:57.0299165+08:00;True|2026-01-26T14:29:11.8825302+08:00;True|2026-01-26T14:25:25.0691029+08:00;True|2026-01-26T14:23:38.9214637+08:00;True|2026-01-26T14:10:02.1355322+08:00;True|2026-01-26T14:04:37.4607803+08:00;True|2026-01-26T13:53:40.0068746+08:00;True|2026-01-26T09:56:08.7581146+08:00;False|2026-01-26T09:55:31.9133413+08:00;True|2026-01-22T16:22:54.7532646+08:00;True|2026-01-22T15:20:35.8786912+08:00;True|2026-01-22T15:05:45.5847432+08:00;True|2026-01-22T14:30:51.3737117+08:00;True|2026-01-22T14:27:07.3723210+08:00;True|2026-01-22T14:15:47.5371528+08:00;True|2026-01-22T11:23:57.8496413+08:00;True|2026-01-22T11:21:57.8847886+08:00;False|2026-01-22T11:17:40.8281638+08:00;True|2026-01-22T11:07:36.5601512+08:00;True|2026-01-22T10:59:27.4506851+08:00;True|2026-01-22T10:32:38.7652468+08:00;True|2026-01-22T10:16:56.7567817+08:00;False|2026-01-22T10:12:28.3322522+08:00;True|2026-01-22T10:10:06.8615667+08:00;True|2026-01-22T09:43:12.7110339+08:00;True|2026-01-22T09:40:45.5823227+08:00;True|2026-01-22T09:31:34.0508221+08:00;True|2026-01-22T08:11:37.9818815+08:00;False|2026-01-22T08:11:04.8101514+08:00;True|2026-01-19T16:39:45.2711197+08:00;True|2026-01-19T16:21:02.6483395+08:00;False|2026-01-19T16:20:38.8982697+08:00;</History>
    <_PublishTargetUrl>D:\gz\网站发布\MES-WEB-API</_PublishTargetUrl>
  </PropertyGroup>
  <ItemGroup>
@@ -45,28 +45,28 @@
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>01/22/2026 14:15:35</publishTime>
      <publishTime>01/26/2026 13:53:26</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>01/22/2026 14:15:35</publishTime>
      <publishTime>01/26/2026 13:53:26</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>01/22/2026 14:15:32</publishTime>
      <publishTime>01/26/2026 13:53:23</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>01/22/2026 14:15:32</publishTime>
      <publishTime>01/26/2026 13:53:23</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>01/22/2026 08:11:16</publishTime>
      <publishTime>01/26/2026 09:55:44</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>01/22/2026 08:11:16</publishTime>
      <publishTime>01/26/2026 09:55:44</publishTime>
    </File>
    <File Include="bin/Fleck.dll">
      <publishTime>04/22/2021 11:48:12</publishTime>
@@ -123,10 +123,10 @@
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>01/22/2026 14:15:29</publishTime>
      <publishTime>01/26/2026 13:53:19</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>01/22/2026 14:15:29</publishTime>
      <publishTime>01/26/2026 13:53:19</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>11/12/2025 10:43:47</publishTime>
@@ -159,25 +159,25 @@
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>01/19/2026 16:20:46</publishTime>
      <publishTime>01/26/2026 09:55:42</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>01/19/2026 16:20:46</publishTime>
      <publishTime>01/26/2026 09:55:42</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>01/19/2026 16:20:47</publishTime>
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>01/19/2026 16:20:47</publishTime>
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>01/20/2026 10:05:54</publishTime>
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>01/20/2026 10:05:54</publishTime>
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
@@ -297,22 +297,22 @@
      <publishTime>05/09/2023 10:43:40</publishTime>
    </File>
    <File Include="bin/TopSdk.dll">
      <publishTime>01/19/2026 16:14:36</publishTime>
      <publishTime>01/22/2026 16:36:48</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>01/19/2026 16:14:36</publishTime>
      <publishTime>01/22/2026 16:36:48</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>01/22/2026 16:22:48</publishTime>
      <publishTime>01/26/2026 14:49:48</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>01/22/2026 16:22:48</publishTime>
      <publishTime>01/26/2026 14:49:48</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>01/22/2026 16:22:51</publishTime>
      <publishTime>01/26/2026 14:49:51</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
WebAPI/Properties/PublishProfiles/FolderProfile7.pubxml
New file
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <DeleteExistingFiles>False</DeleteExistingFiles>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <PublishProvider>FileSystem</PublishProvider>
    <PublishUrl>D:\gz\网站发布\MES-WEB-API</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
  </PropertyGroup>
</Project>
WebAPI/Properties/PublishProfiles/FolderProfile7.pubxml.user
New file
@@ -0,0 +1,522 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <_PublishTargetUrl>D:\gz\网站发布\MES-WEB-API</_PublishTargetUrl>
    <History>True|2026-01-26T07:10:13.6535170Z;True|2026-01-26T15:08:38.3958751+08:00;True|2026-01-26T15:07:50.3955663+08:00;True|2026-01-26T15:06:43.6315527+08:00;True|2026-01-26T15:06:05.0476013+08:00;True|2026-01-26T15:03:00.5841031+08:00;False|2026-01-26T15:02:24.3781055+08:00;True|2026-01-26T14:58:08.2583849+08:00;True|2026-01-26T14:55:25.6774548+08:00;</History>
  </PropertyGroup>
  <ItemGroup>
    <File Include="apiapp.json">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.EndpointUtil.dll">
      <publishTime>04/07/2020 16:33:48</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.GatewayDingTalk.dll">
      <publishTime>04/25/2023 17:49:04</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.GatewaySpi.dll">
      <publishTime>07/31/2024 20:50:30</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.OpenApiClient.dll">
      <publishTime>08/06/2024 18:07:52</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.OpenApiUtil.dll">
      <publishTime>11/22/2022 11:24:18</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.SDK.Dingtalk.dll">
      <publishTime>08/08/2024 19:43:22</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.TeaUtil.dll">
      <publishTime>07/15/2024 20:25:56</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.TeaXML.dll">
      <publishTime>08/03/2022 21:46:08</publishTime>
    </File>
    <File Include="bin/Aliyun.Credentials.dll">
      <publishTime>07/24/2024 10:36:58</publishTime>
    </File>
    <File Include="bin/Antlr3.Runtime.dll">
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/Antlr3.Runtime.pdb">
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>01/26/2026 13:53:26</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>01/26/2026 13:53:26</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>01/26/2026 13:53:23</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>01/26/2026 13:53:23</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>01/26/2026 09:55:44</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>01/26/2026 09:55:44</publishTime>
    </File>
    <File Include="bin/Fleck.dll">
      <publishTime>04/22/2021 11:48:12</publishTime>
    </File>
    <File Include="bin/GetuiServerApiSDK.dll">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/GetuiServerApiSDK.dll.config">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/Google.ProtocolBuffers.dll">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.dll">
      <publishTime>03/22/2022 13:17:26</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.pdb">
      <publishTime>03/19/2022 07:39:42</publishTime>
    </File>
    <File Include="bin/Grpc.Core.dll">
      <publishTime>03/22/2022 13:17:20</publishTime>
    </File>
    <File Include="bin/Grpc.Core.pdb">
      <publishTime>03/19/2022 07:39:48</publishTime>
    </File>
    <File Include="bin/grpc_csharp_ext.x64.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="bin/grpc_csharp_ext.x86.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="bin/ICSharpCode.SharpZipLib.dll">
      <publishTime>05/09/2021 01:08:30</publishTime>
    </File>
    <File Include="bin/ICSharpCode.SharpZipLib.pdb">
      <publishTime>05/09/2021 01:08:30</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/libgrpc_csharp_ext.x64.dylib">
      <publishTime>03/19/2022 07:38:44</publishTime>
    </File>
    <File Include="bin/libgrpc_csharp_ext.x64.so">
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll">
      <publishTime>03/19/2015 01:02:50</publishTime>
    </File>
    <File Include="bin/Microsoft.CSharp.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/Microsoft.Web.Infrastructure.dll">
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>01/26/2026 13:53:19</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>01/26/2026 13:53:19</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/Newtonsoft.Json.dll">
      <publishTime>03/08/2023 15:09:56</publishTime>
    </File>
    <File Include="bin/NPOI.dll">
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OOXML.dll">
      <publishTime>10/23/2021 09:07:56</publishTime>
    </File>
    <File Include="bin/NPOI.OOXML.pdb">
      <publishTime>10/23/2021 17:07:56</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXml4Net.dll">
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXml4Net.pdb">
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXmlFormats.dll">
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXmlFormats.pdb">
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.pdb">
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>01/26/2026 09:55:42</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>01/26/2026 09:55:42</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.dll">
      <publishTime>01/19/2026 15:35:44</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.pdb">
      <publishTime>01/19/2026 15:35:44</publishTime>
    </File>
    <File Include="bin/System.Buffers.dll">
      <publishTime>07/19/2017 18:01:28</publishTime>
    </File>
    <File Include="bin/System.ComponentModel.DataAnnotations.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Configuration.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Data.DataSetExtensions.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Data.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Drawing.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.EnterpriseServices.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.IdentityModel.Tokens.Jwt.dll">
      <publishTime>08/19/2014 18:03:34</publishTime>
    </File>
    <File Include="bin/System.Memory.dll">
      <publishTime>04/18/2019 00:24:34</publishTime>
    </File>
    <File Include="bin/System.Net.Http.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Net.Http.Extensions.dll">
      <publishTime>02/20/2015 04:10:46</publishTime>
    </File>
    <File Include="bin/System.Net.Http.Formatting.dll">
      <publishTime>11/28/2018 21:00:36</publishTime>
    </File>
    <File Include="bin/System.Net.Http.Primitives.dll">
      <publishTime>02/20/2015 04:10:46</publishTime>
    </File>
    <File Include="bin/System.Runtime.CompilerServices.Unsafe.dll">
      <publishTime>09/19/2018 03:38:10</publishTime>
    </File>
    <File Include="bin/System.Runtime.Serialization.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.ApplicationServices.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Cors.dll">
      <publishTime>11/28/2018 20:58:44</publishTime>
    </File>
    <File Include="bin/System.Web.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.DynamicData.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Entity.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Extensions.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Helpers.dll">
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.Http.Cors.dll">
      <publishTime>11/28/2018 21:01:26</publishTime>
    </File>
    <File Include="bin/System.Web.Http.dll">
      <publishTime>11/28/2018 21:01:00</publishTime>
    </File>
    <File Include="bin/System.Web.Http.WebHost.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/System.Web.Mvc.dll">
      <publishTime>01/28/2015 12:02:18</publishTime>
    </File>
    <File Include="bin/System.Web.Optimization.dll">
      <publishTime>02/11/2014 23:26:04</publishTime>
    </File>
    <File Include="bin/System.Web.Razor.dll">
      <publishTime>01/28/2015 12:02:32</publishTime>
    </File>
    <File Include="bin/System.Web.Services.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.Deployment.dll">
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.dll">
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.Razor.dll">
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Xml.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Xml.Linq.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/Tea.dll">
      <publishTime>05/09/2023 10:43:40</publishTime>
    </File>
    <File Include="bin/TopSdk.dll">
      <publishTime>01/22/2026 16:36:48</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>01/22/2026 16:36:48</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>01/26/2026 15:10:07</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>01/26/2026 15:10:07</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>01/26/2026 15:10:10</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
    </File>
    <File Include="bin/zh-Hans/System.Net.Http.Formatting.resources.dll">
      <publishTime>11/29/2018 21:26:02</publishTime>
    </File>
    <File Include="bin/zh-Hans/System.Web.Http.resources.dll">
      <publishTime>11/29/2018 21:26:30</publishTime>
    </File>
    <File Include="Config/kdapi.config">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Content/bootstrap.css">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Content/bootstrap.min.css">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Content/Site.css">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/BLL.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/DAL.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/DBUtility.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Interop.grsvr6Lib.dll">
      <publishTime>12/17/2025 13:18:47</publishTime>
    </File>
    <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Model.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Newtonsoft.Json.Net35.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Pub_Class.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Pub_Control.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/SQLHelper.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.eot">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.svg">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.ttf">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.woff">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="Global.asax">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="grpc_csharp_ext.x64.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="grpc_csharp_ext.x86.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="Index.html">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="libgrpc_csharp_ext.x64.dylib">
      <publishTime>03/19/2022 07:38:44</publishTime>
    </File>
    <File Include="libgrpc_csharp_ext.x64.so">
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="libman.json">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="packages.config">
      <publishTime>01/19/2026 15:12:26</publishTime>
    </File>
    <File Include="Properties/PublishProfiles/JFAPI.pubxml.user">
      <publishTime>12/09/2025 08:11:33</publishTime>
    </File>
    <File Include="Template/barCodeTemplateStorage.json">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Utility/Barcode.ashx">
      <publishTime>12/17/2025 13:18:47</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.min.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.map">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.min.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/modernizr-2.6.2.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Shared/Error.cshtml">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Shared/_Layout.cshtml">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/web.config">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/_ViewStart.cshtml">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsKf_ICStockBill_Mould.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>01/26/2026 14:55:22</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml
New file
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <DeleteExistingFiles>False</DeleteExistingFiles>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <PublishProvider>FileSystem</PublishProvider>
    <PublishUrl>D:\gz\wy\MES-WEB-API</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
  </PropertyGroup>
</Project>
WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml.user
New file
@@ -0,0 +1,561 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <_PublishTargetUrl>D:\gz\wy\MES-WEB-API</_PublishTargetUrl>
    <History>True|2026-01-27T06:38:42.1847305Z;True|2026-01-27T14:35:31.4859936+08:00;True|2026-01-27T14:18:36.2122726+08:00;True|2026-01-27T14:03:03.8424130+08:00;True|2026-01-27T13:14:23.0197795+08:00;True|2026-01-27T11:26:12.7603302+08:00;True|2026-01-27T11:23:11.2980950+08:00;True|2026-01-27T11:17:42.7742881+08:00;True|2026-01-27T10:27:13.8894331+08:00;True|2026-01-27T10:22:33.6468907+08:00;True|2026-01-27T10:13:18.5553398+08:00;False|2026-01-27T10:10:23.9320618+08:00;True|2026-01-27T10:00:58.3355300+08:00;False|2026-01-27T10:00:37.4820904+08:00;True|2026-01-27T09:45:12.8813559+08:00;True|2026-01-27T09:41:43.1787804+08:00;True|2026-01-27T09:40:22.3478291+08:00;True|2026-01-27T09:39:19.6165154+08:00;True|2026-01-27T09:37:31.7523727+08:00;True|2026-01-27T08:33:15.6345855+08:00;True|2026-01-27T08:25:27.8955175+08:00;False|2026-01-27T08:24:59.4512268+08:00;True|2026-01-26T16:40:38.8412768+08:00;True|2026-01-26T16:16:41.7932895+08:00;True|2026-01-26T16:15:35.4808695+08:00;True|2026-01-26T16:08:19.1707669+08:00;True|2026-01-26T16:07:38.4808637+08:00;True|2026-01-26T16:00:28.5139031+08:00;True|2026-01-26T15:56:20.5415856+08:00;True|2026-01-26T15:47:55.9662192+08:00;True|2026-01-26T15:40:45.2534281+08:00;True|2026-01-26T15:39:09.6931174+08:00;True|2026-01-26T15:37:51.9154771+08:00;True|2026-01-26T15:33:35.6039826+08:00;True|2026-01-26T15:31:52.9425047+08:00;True|2026-01-26T15:30:45.3923302+08:00;True|2026-01-26T15:29:05.0429905+08:00;True|2026-01-26T15:27:05.4558977+08:00;True|2026-01-26T15:26:29.2629885+08:00;True|2026-01-26T15:25:43.3181913+08:00;True|2026-01-26T15:25:14.6706698+08:00;True|2026-01-26T15:24:20.6134253+08:00;True|2026-01-26T15:23:57.0303408+08:00;True|2026-01-26T15:20:06.4088432+08:00;True|2026-01-26T15:19:31.8076951+08:00;True|2026-01-26T15:14:49.8542368+08:00;</History>
  </PropertyGroup>
  <ItemGroup>
    <File Include="apiapp.json">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.EndpointUtil.dll">
      <publishTime>04/07/2020 16:33:48</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.GatewayDingTalk.dll">
      <publishTime>04/25/2023 17:49:04</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.GatewaySpi.dll">
      <publishTime>07/31/2024 20:50:30</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.OpenApiClient.dll">
      <publishTime>08/06/2024 18:07:52</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.OpenApiUtil.dll">
      <publishTime>11/22/2022 11:24:18</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.SDK.Dingtalk.dll">
      <publishTime>08/08/2024 19:43:22</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.TeaUtil.dll">
      <publishTime>07/15/2024 20:25:56</publishTime>
    </File>
    <File Include="bin/AlibabaCloud.TeaXML.dll">
      <publishTime>08/03/2022 21:46:08</publishTime>
    </File>
    <File Include="bin/Aliyun.Credentials.dll">
      <publishTime>07/24/2024 10:36:58</publishTime>
    </File>
    <File Include="bin/Antlr3.Runtime.dll">
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/Antlr3.Runtime.pdb">
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>01/27/2026 14:18:22</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>01/27/2026 14:18:22</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>01/27/2026 14:18:20</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>01/27/2026 14:18:20</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>01/26/2026 09:55:44</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>01/26/2026 09:55:44</publishTime>
    </File>
    <File Include="bin/Fleck.dll">
      <publishTime>04/22/2021 11:48:12</publishTime>
    </File>
    <File Include="bin/GetuiServerApiSDK.dll">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/GetuiServerApiSDK.dll.config">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/Google.ProtocolBuffers.dll">
      <publishTime>01/19/2026 16:14:36</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.dll">
      <publishTime>03/22/2022 13:17:26</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.pdb">
      <publishTime>03/19/2022 07:39:42</publishTime>
    </File>
    <File Include="bin/Grpc.Core.dll">
      <publishTime>03/22/2022 13:17:20</publishTime>
    </File>
    <File Include="bin/Grpc.Core.pdb">
      <publishTime>03/19/2022 07:39:48</publishTime>
    </File>
    <File Include="bin/grpc_csharp_ext.x64.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="bin/grpc_csharp_ext.x86.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="bin/ICSharpCode.SharpZipLib.dll">
      <publishTime>05/09/2021 01:08:30</publishTime>
    </File>
    <File Include="bin/ICSharpCode.SharpZipLib.pdb">
      <publishTime>05/09/2021 01:08:30</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/libgrpc_csharp_ext.x64.dylib">
      <publishTime>03/19/2022 07:38:44</publishTime>
    </File>
    <File Include="bin/libgrpc_csharp_ext.x64.so">
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="bin/Microsoft.AspNet.SignalR.Core.dll">
      <publishTime>05/04/2017 02:25:34</publishTime>
    </File>
    <File Include="bin/Microsoft.AspNet.SignalR.SystemWeb.dll">
      <publishTime>05/04/2017 02:25:40</publishTime>
    </File>
    <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll">
      <publishTime>03/19/2015 01:02:50</publishTime>
    </File>
    <File Include="bin/Microsoft.CSharp.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.dll">
      <publishTime>01/18/2019 20:50:30</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.Host.SystemWeb.dll">
      <publishTime>01/18/2019 20:50:50</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.Security.dll">
      <publishTime>01/18/2019 20:51:10</publishTime>
    </File>
    <File Include="bin/Microsoft.Web.Infrastructure.dll">
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>01/27/2026 14:02:44</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>01/27/2026 14:02:44</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/Newtonsoft.Json.dll">
      <publishTime>03/08/2023 15:09:56</publishTime>
    </File>
    <File Include="bin/NPOI.dll">
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OOXML.dll">
      <publishTime>10/23/2021 09:07:56</publishTime>
    </File>
    <File Include="bin/NPOI.OOXML.pdb">
      <publishTime>10/23/2021 17:07:56</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXml4Net.dll">
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXml4Net.pdb">
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXmlFormats.dll">
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXmlFormats.pdb">
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.pdb">
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Owin.dll">
      <publishTime>11/13/2012 12:19:34</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>01/26/2026 09:55:42</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>01/26/2026 09:55:42</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>01/26/2026 09:55:43</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.dll">
      <publishTime>01/19/2026 15:35:44</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.pdb">
      <publishTime>01/19/2026 15:35:44</publishTime>
    </File>
    <File Include="bin/System.Buffers.dll">
      <publishTime>07/19/2017 18:01:28</publishTime>
    </File>
    <File Include="bin/System.ComponentModel.DataAnnotations.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Configuration.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Data.DataSetExtensions.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Data.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Drawing.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.EnterpriseServices.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.IdentityModel.Tokens.Jwt.dll">
      <publishTime>08/19/2014 18:03:34</publishTime>
    </File>
    <File Include="bin/System.Memory.dll">
      <publishTime>04/18/2019 00:24:34</publishTime>
    </File>
    <File Include="bin/System.Net.Http.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Net.Http.Extensions.dll">
      <publishTime>02/20/2015 04:10:46</publishTime>
    </File>
    <File Include="bin/System.Net.Http.Formatting.dll">
      <publishTime>11/28/2018 21:00:36</publishTime>
    </File>
    <File Include="bin/System.Net.Http.Primitives.dll">
      <publishTime>02/20/2015 04:10:46</publishTime>
    </File>
    <File Include="bin/System.Runtime.CompilerServices.Unsafe.dll">
      <publishTime>09/19/2018 03:38:10</publishTime>
    </File>
    <File Include="bin/System.Runtime.Serialization.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.ApplicationServices.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Cors.dll">
      <publishTime>11/28/2018 20:58:44</publishTime>
    </File>
    <File Include="bin/System.Web.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.DynamicData.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Entity.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Extensions.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Helpers.dll">
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.Http.Cors.dll">
      <publishTime>11/28/2018 21:01:26</publishTime>
    </File>
    <File Include="bin/System.Web.Http.dll">
      <publishTime>11/28/2018 21:01:00</publishTime>
    </File>
    <File Include="bin/System.Web.Http.WebHost.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="bin/System.Web.Mvc.dll">
      <publishTime>01/28/2015 12:02:18</publishTime>
    </File>
    <File Include="bin/System.Web.Optimization.dll">
      <publishTime>02/11/2014 23:26:04</publishTime>
    </File>
    <File Include="bin/System.Web.Razor.dll">
      <publishTime>01/28/2015 12:02:32</publishTime>
    </File>
    <File Include="bin/System.Web.Services.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.Deployment.dll">
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.dll">
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.Razor.dll">
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Xml.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Xml.Linq.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/Tea.dll">
      <publishTime>05/09/2023 10:43:40</publishTime>
    </File>
    <File Include="bin/TopSdk.dll">
      <publishTime>01/22/2026 16:36:48</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>01/22/2026 16:36:48</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>01/27/2026 14:38:37</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>01/27/2026 14:38:37</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>01/27/2026 14:38:41</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.AspNet.SignalR.Core.resources.dll">
      <publishTime>05/04/2017 02:34:10</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.AspNet.SignalR.SystemWeb.resources.dll">
      <publishTime>05/04/2017 02:34:16</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.Host.SystemWeb.resources.dll">
      <publishTime>01/18/2019 12:59:56</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.resources.dll">
      <publishTime>01/18/2019 12:59:58</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.Security.resources.dll">
      <publishTime>01/18/2019 13:00:00</publishTime>
    </File>
    <File Include="bin/zh-Hans/System.Net.Http.Formatting.resources.dll">
      <publishTime>11/29/2018 21:26:02</publishTime>
    </File>
    <File Include="bin/zh-Hans/System.Web.Http.resources.dll">
      <publishTime>11/29/2018 21:26:30</publishTime>
    </File>
    <File Include="Config/kdapi.config">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Content/bootstrap.css">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Content/bootstrap.min.css">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Content/Site.css">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/BLL.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/DAL.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/DBUtility.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Interop.grsvr6Lib.dll">
      <publishTime>12/17/2025 13:18:47</publishTime>
    </File>
    <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Model.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Newtonsoft.Json.Net35.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Pub_Class.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/Pub_Control.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="DLL/SQLHelper.dll">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.eot">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.svg">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.ttf">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.woff">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="Global.asax">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="grpc_csharp_ext.x64.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="grpc_csharp_ext.x86.dll">
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="Index.html">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="libgrpc_csharp_ext.x64.dylib">
      <publishTime>03/19/2022 07:38:44</publishTime>
    </File>
    <File Include="libgrpc_csharp_ext.x64.so">
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="libman.json">
      <publishTime>11/12/2025 10:43:48</publishTime>
    </File>
    <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="packages.config">
      <publishTime>01/27/2026 08:36:04</publishTime>
    </File>
    <File Include="Properties/PublishProfiles/JFAPI.pubxml.user">
      <publishTime>12/09/2025 08:11:33</publishTime>
    </File>
    <File Include="Scripts/jquery.signalR-2.2.2.js">
      <publishTime>01/27/2026 08:35:50</publishTime>
    </File>
    <File Include="Scripts/jquery.signalR-2.2.2.min.js">
      <publishTime>01/27/2026 08:35:50</publishTime>
    </File>
    <File Include="Template/barCodeTemplateStorage.json">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Utility/Barcode.ashx">
      <publishTime>12/17/2025 13:18:47</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.min.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.map">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.min.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Scripts/modernizr-2.6.2.js">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Shared/Error.cshtml">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/Shared/_Layout.cshtml">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/web.config">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Views/_ViewStart.cshtml">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsKf_ICStockBill_Mould.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
      <publishTime>11/12/2025 10:43:47</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>01/27/2026 10:27:13</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Scripts/jquery.signalR-2.2.2.js
New file
@@ -0,0 +1,2958 @@
/* jquery.signalR.core.js */
/*global window:false */
/*!
 * ASP.NET SignalR JavaScript Library v2.2.2
 * http://signalr.net/
 *
 * Copyright (c) .NET Foundation. All rights reserved.
 * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 *
 */
/// <reference path="Scripts/jquery-1.6.4.js" />
/// <reference path="jquery.signalR.version.js" />
(function ($, window, undefined) {
    var resources = {
        nojQuery: "jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",
        noTransportOnInit: "No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",
        errorOnNegotiate: "Error during negotiation request.",
        stoppedWhileLoading: "The connection was stopped during page load.",
        stoppedWhileNegotiating: "The connection was stopped during the negotiate request.",
        errorParsingNegotiateResponse: "Error parsing negotiate response.",
        errorDuringStartRequest: "Error during start request. Stopping the connection.",
        stoppedDuringStartRequest: "The connection was stopped during the start request.",
        errorParsingStartResponse: "Error parsing start response: '{0}'. Stopping the connection.",
        invalidStartResponse: "Invalid start response: '{0}'. Stopping the connection.",
        protocolIncompatible: "You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",
        sendFailed: "Send failed.",
        parseFailed: "Failed at parsing response: {0}",
        longPollFailed: "Long polling request failed.",
        eventSourceFailedToConnect: "EventSource failed to connect.",
        eventSourceError: "Error raised by EventSource",
        webSocketClosed: "WebSocket closed.",
        pingServerFailedInvalidResponse: "Invalid ping response when pinging server: '{0}'.",
        pingServerFailed: "Failed to ping server.",
        pingServerFailedStatusCode: "Failed to ping server.  Server responded with status code {0}, stopping the connection.",
        pingServerFailedParse: "Failed to parse ping server response, stopping the connection.",
        noConnectionTransport: "Connection is in an invalid state, there is no transport active.",
        webSocketsInvalidState: "The Web Socket transport is in an invalid state, transitioning into reconnecting.",
        reconnectTimeout: "Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",
        reconnectWindowTimeout: "The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."
    };
    if (typeof ($) !== "function") {
        // no jQuery!
        throw new Error(resources.nojQuery);
    }
    var signalR,
        _connection,
        _pageLoaded = (window.document.readyState === "complete"),
        _pageWindow = $(window),
        _negotiateAbortText = "__Negotiate Aborted__",
        events = {
            onStart: "onStart",
            onStarting: "onStarting",
            onReceived: "onReceived",
            onError: "onError",
            onConnectionSlow: "onConnectionSlow",
            onReconnecting: "onReconnecting",
            onReconnect: "onReconnect",
            onStateChanged: "onStateChanged",
            onDisconnect: "onDisconnect"
        },
        ajaxDefaults = {
            processData: true,
            timeout: null,
            async: true,
            global: false,
            cache: false
        },
        log = function (msg, logging) {
            if (logging === false) {
                return;
            }
            var m;
            if (typeof (window.console) === "undefined") {
                return;
            }
            m = "[" + new Date().toTimeString() + "] SignalR: " + msg;
            if (window.console.debug) {
                window.console.debug(m);
            } else if (window.console.log) {
                window.console.log(m);
            }
        },
        changeState = function (connection, expectedState, newState) {
            if (expectedState === connection.state) {
                connection.state = newState;
                $(connection).triggerHandler(events.onStateChanged, [{ oldState: expectedState, newState: newState }]);
                return true;
            }
            return false;
        },
        isDisconnecting = function (connection) {
            return connection.state === signalR.connectionState.disconnected;
        },
        supportsKeepAlive = function (connection) {
            return connection._.keepAliveData.activated &&
                   connection.transport.supportsKeepAlive(connection);
        },
        configureStopReconnectingTimeout = function (connection) {
            var stopReconnectingTimeout,
                onReconnectTimeout;
            // Check if this connection has already been configured to stop reconnecting after a specified timeout.
            // Without this check if a connection is stopped then started events will be bound multiple times.
            if (!connection._.configuredStopReconnectingTimeout) {
                onReconnectTimeout = function (connection) {
                    var message = signalR._.format(signalR.resources.reconnectTimeout, connection.disconnectTimeout);
                    connection.log(message);
                    $(connection).triggerHandler(events.onError, [signalR._.error(message, /* source */ "TimeoutException")]);
                    connection.stop(/* async */ false, /* notifyServer */ false);
                };
                connection.reconnecting(function () {
                    var connection = this;
                    // Guard against state changing in a previous user defined even handler
                    if (connection.state === signalR.connectionState.reconnecting) {
                        stopReconnectingTimeout = window.setTimeout(function () { onReconnectTimeout(connection); }, connection.disconnectTimeout);
                    }
                });
                connection.stateChanged(function (data) {
                    if (data.oldState === signalR.connectionState.reconnecting) {
                        // Clear the pending reconnect timeout check
                        window.clearTimeout(stopReconnectingTimeout);
                    }
                });
                connection._.configuredStopReconnectingTimeout = true;
            }
        };
    signalR = function (url, qs, logging) {
        /// <summary>Creates a new SignalR connection for the given url</summary>
        /// <param name="url" type="String">The URL of the long polling endpoint</param>
        /// <param name="qs" type="Object">
        ///     [Optional] Custom querystring parameters to add to the connection URL.
        ///     If an object, every non-function member will be added to the querystring.
        ///     If a string, it's added to the QS as specified.
        /// </param>
        /// <param name="logging" type="Boolean">
        ///     [Optional] A flag indicating whether connection logging is enabled to the browser
        ///     console/log. Defaults to false.
        /// </param>
        return new signalR.fn.init(url, qs, logging);
    };
    signalR._ = {
        defaultContentType: "application/x-www-form-urlencoded; charset=UTF-8",
        ieVersion: (function () {
            var version,
                matches;
            if (window.navigator.appName === 'Microsoft Internet Explorer') {
                // Check if the user agent has the pattern "MSIE (one or more numbers).(one or more numbers)";
                matches = /MSIE ([0-9]+\.[0-9]+)/.exec(window.navigator.userAgent);
                if (matches) {
                    version = window.parseFloat(matches[1]);
                }
            }
            // undefined value means not IE
            return version;
        })(),
        error: function (message, source, context) {
            var e = new Error(message);
            e.source = source;
            if (typeof context !== "undefined") {
                e.context = context;
            }
            return e;
        },
        transportError: function (message, transport, source, context) {
            var e = this.error(message, source, context);
            e.transport = transport ? transport.name : undefined;
            return e;
        },
        format: function () {
            /// <summary>Usage: format("Hi {0}, you are {1}!", "Foo", 100) </summary>
            var s = arguments[0];
            for (var i = 0; i < arguments.length - 1; i++) {
                s = s.replace("{" + i + "}", arguments[i + 1]);
            }
            return s;
        },
        firefoxMajorVersion: function (userAgent) {
            // Firefox user agents: http://useragentstring.com/pages/Firefox/
            var matches = userAgent.match(/Firefox\/(\d+)/);
            if (!matches || !matches.length || matches.length < 2) {
                return 0;
            }
            return parseInt(matches[1], 10 /* radix */);
        },
        configurePingInterval: function (connection) {
            var config = connection._.config,
                onFail = function (error) {
                    $(connection).triggerHandler(events.onError, [error]);
                };
            if (config && !connection._.pingIntervalId && config.pingInterval) {
                connection._.pingIntervalId = window.setInterval(function () {
                    signalR.transports._logic.pingServer(connection).fail(onFail);
                }, config.pingInterval);
            }
        }
    };
    signalR.events = events;
    signalR.resources = resources;
    signalR.ajaxDefaults = ajaxDefaults;
    signalR.changeState = changeState;
    signalR.isDisconnecting = isDisconnecting;
    signalR.connectionState = {
        connecting: 0,
        connected: 1,
        reconnecting: 2,
        disconnected: 4
    };
    signalR.hub = {
        start: function () {
            // This will get replaced with the real hub connection start method when hubs is referenced correctly
            throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'></script>.");
        }
    };
    // .on() was added in version 1.7.0, .load() was removed in version 3.0.0 so we fallback to .load() if .on() does
    // not exist to not break existing applications
    if (typeof _pageWindow.on == "function") {
        _pageWindow.on("load", function () { _pageLoaded = true; });
    }
    else {
        _pageWindow.load(function () { _pageLoaded = true; });
    }
    function validateTransport(requestedTransport, connection) {
        /// <summary>Validates the requested transport by cross checking it with the pre-defined signalR.transports</summary>
        /// <param name="requestedTransport" type="Object">The designated transports that the user has specified.</param>
        /// <param name="connection" type="signalR">The connection that will be using the requested transports.  Used for logging purposes.</param>
        /// <returns type="Object" />
        if ($.isArray(requestedTransport)) {
            // Go through transport array and remove an "invalid" tranports
            for (var i = requestedTransport.length - 1; i >= 0; i--) {
                var transport = requestedTransport[i];
                if ($.type(transport) !== "string" || !signalR.transports[transport]) {
                    connection.log("Invalid transport: " + transport + ", removing it from the transports list.");
                    requestedTransport.splice(i, 1);
                }
            }
            // Verify we still have transports left, if we dont then we have invalid transports
            if (requestedTransport.length === 0) {
                connection.log("No transports remain within the specified transport array.");
                requestedTransport = null;
            }
        } else if (!signalR.transports[requestedTransport] && requestedTransport !== "auto") {
            connection.log("Invalid transport: " + requestedTransport.toString() + ".");
            requestedTransport = null;
        } else if (requestedTransport === "auto" && signalR._.ieVersion <= 8) {
            // If we're doing an auto transport and we're IE8 then force longPolling, #1764
            return ["longPolling"];
        }
        return requestedTransport;
    }
    function getDefaultPort(protocol) {
        if (protocol === "http:") {
            return 80;
        } else if (protocol === "https:") {
            return 443;
        }
    }
    function addDefaultPort(protocol, url) {
        // Remove ports  from url.  We have to check if there's a / or end of line
        // following the port in order to avoid removing ports such as 8080.
        if (url.match(/:\d+$/)) {
            return url;
        } else {
            return url + ":" + getDefaultPort(protocol);
        }
    }
    function ConnectingMessageBuffer(connection, drainCallback) {
        var that = this,
            buffer = [];
        that.tryBuffer = function (message) {
            if (connection.state === $.signalR.connectionState.connecting) {
                buffer.push(message);
                return true;
            }
            return false;
        };
        that.drain = function () {
            // Ensure that the connection is connected when we drain (do not want to drain while a connection is not active)
            if (connection.state === $.signalR.connectionState.connected) {
                while (buffer.length > 0) {
                    drainCallback(buffer.shift());
                }
            }
        };
        that.clear = function () {
            buffer = [];
        };
    }
    signalR.fn = signalR.prototype = {
        init: function (url, qs, logging) {
            var $connection = $(this);
            this.url = url;
            this.qs = qs;
            this.lastError = null;
            this._ = {
                keepAliveData: {},
                connectingMessageBuffer: new ConnectingMessageBuffer(this, function (message) {
                    $connection.triggerHandler(events.onReceived, [message]);
                }),
                lastMessageAt: new Date().getTime(),
                lastActiveAt: new Date().getTime(),
                beatInterval: 5000, // Default value, will only be overridden if keep alive is enabled,
                beatHandle: null,
                totalTransportConnectTimeout: 0 // This will be the sum of the TransportConnectTimeout sent in response to negotiate and connection.transportConnectTimeout
            };
            if (typeof (logging) === "boolean") {
                this.logging = logging;
            }
        },
        _parseResponse: function (response) {
            var that = this;
            if (!response) {
                return response;
            } else if (typeof response === "string") {
                return that.json.parse(response);
            } else {
                return response;
            }
        },
        _originalJson: window.JSON,
        json: window.JSON,
        isCrossDomain: function (url, against) {
            /// <summary>Checks if url is cross domain</summary>
            /// <param name="url" type="String">The base URL</param>
            /// <param name="against" type="Object">
            ///     An optional argument to compare the URL against, if not specified it will be set to window.location.
            ///     If specified it must contain a protocol and a host property.
            /// </param>
            var link;
            url = $.trim(url);
            against = against || window.location;
            if (url.indexOf("http") !== 0) {
                return false;
            }
            // Create an anchor tag.
            link = window.document.createElement("a");
            link.href = url;
            // When checking for cross domain we have to special case port 80 because the window.location will remove the
            return link.protocol + addDefaultPort(link.protocol, link.host) !== against.protocol + addDefaultPort(against.protocol, against.host);
        },
        ajaxDataType: "text",
        contentType: "application/json; charset=UTF-8",
        logging: false,
        state: signalR.connectionState.disconnected,
        clientProtocol: "1.5",
        reconnectDelay: 2000,
        transportConnectTimeout: 0,
        disconnectTimeout: 30000, // This should be set by the server in response to the negotiate request (30s default)
        reconnectWindow: 30000, // This should be set by the server in response to the negotiate request
        keepAliveWarnAt: 2 / 3, // Warn user of slow connection if we breach the X% mark of the keep alive timeout
        start: function (options, callback) {
            /// <summary>Starts the connection</summary>
            /// <param name="options" type="Object">Options map</param>
            /// <param name="callback" type="Function">A callback function to execute when the connection has started</param>
            var connection = this,
                config = {
                    pingInterval: 300000,
                    waitForPageLoad: true,
                    transport: "auto",
                    jsonp: false
                },
                initialize,
                deferred = connection._deferral || $.Deferred(), // Check to see if there is a pre-existing deferral that's being built on, if so we want to keep using it
                parser = window.document.createElement("a");
            connection.lastError = null;
            // Persist the deferral so that if start is called multiple times the same deferral is used.
            connection._deferral = deferred;
            if (!connection.json) {
                // no JSON!
                throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");
            }
            if ($.type(options) === "function") {
                // Support calling with single callback parameter
                callback = options;
            } else if ($.type(options) === "object") {
                $.extend(config, options);
                if ($.type(config.callback) === "function") {
                    callback = config.callback;
                }
            }
            config.transport = validateTransport(config.transport, connection);
            // If the transport is invalid throw an error and abort start
            if (!config.transport) {
                throw new Error("SignalR: Invalid transport(s) specified, aborting start.");
            }
            connection._.config = config;
            // Check to see if start is being called prior to page load
            // If waitForPageLoad is true we then want to re-direct function call to the window load event
            if (!_pageLoaded && config.waitForPageLoad === true) {
                connection._.deferredStartHandler = function () {
                    connection.start(options, callback);
                };
                _pageWindow.bind("load", connection._.deferredStartHandler);
                return deferred.promise();
            }
            // If we're already connecting just return the same deferral as the original connection start
            if (connection.state === signalR.connectionState.connecting) {
                return deferred.promise();
            } else if (changeState(connection,
                            signalR.connectionState.disconnected,
                            signalR.connectionState.connecting) === false) {
                // We're not connecting so try and transition into connecting.
                // If we fail to transition then we're either in connected or reconnecting.
                deferred.resolve(connection);
                return deferred.promise();
            }
            configureStopReconnectingTimeout(connection);
            // Resolve the full url
            parser.href = connection.url;
            if (!parser.protocol || parser.protocol === ":") {
                connection.protocol = window.document.location.protocol;
                connection.host = parser.host || window.document.location.host;
            } else {
                connection.protocol = parser.protocol;
                connection.host = parser.host;
            }
            connection.baseUrl = connection.protocol + "//" + connection.host;
            // Set the websocket protocol
            connection.wsProtocol = connection.protocol === "https:" ? "wss://" : "ws://";
            // If jsonp with no/auto transport is specified, then set the transport to long polling
            // since that is the only transport for which jsonp really makes sense.
            // Some developers might actually choose to specify jsonp for same origin requests
            // as demonstrated by Issue #623.
            if (config.transport === "auto" && config.jsonp === true) {
                config.transport = "longPolling";
            }
            // If the url is protocol relative, prepend the current windows protocol to the url.
            if (connection.url.indexOf("//") === 0) {
                connection.url = window.location.protocol + connection.url;
                connection.log("Protocol relative URL detected, normalizing it to '" + connection.url + "'.");
            }
            if (this.isCrossDomain(connection.url)) {
                connection.log("Auto detected cross domain url.");
                if (config.transport === "auto") {
                    // TODO: Support XDM with foreverFrame
                    config.transport = ["webSockets", "serverSentEvents", "longPolling"];
                }
                if (typeof (config.withCredentials) === "undefined") {
                    config.withCredentials = true;
                }
                // Determine if jsonp is the only choice for negotiation, ajaxSend and ajaxAbort.
                // i.e. if the browser doesn't supports CORS
                // If it is, ignore any preference to the contrary, and switch to jsonp.
                if (!config.jsonp) {
                    config.jsonp = !$.support.cors;
                    if (config.jsonp) {
                        connection.log("Using jsonp because this browser doesn't support CORS.");
                    }
                }
                connection.contentType = signalR._.defaultContentType;
            }
            connection.withCredentials = config.withCredentials;
            connection.ajaxDataType = config.jsonp ? "jsonp" : "text";
            $(connection).bind(events.onStart, function (e, data) {
                if ($.type(callback) === "function") {
                    callback.call(connection);
                }
                deferred.resolve(connection);
            });
            connection._.initHandler = signalR.transports._logic.initHandler(connection);
            initialize = function (transports, index) {
                var noTransportError = signalR._.error(resources.noTransportOnInit);
                index = index || 0;
                if (index >= transports.length) {
                    if (index === 0) {
                        connection.log("No transports supported by the server were selected.");
                    } else if (index === 1) {
                        connection.log("No fallback transports were selected.");
                    } else {
                        connection.log("Fallback transports exhausted.");
                    }
                    // No transport initialized successfully
                    $(connection).triggerHandler(events.onError, [noTransportError]);
                    deferred.reject(noTransportError);
                    // Stop the connection if it has connected and move it into the disconnected state
                    connection.stop();
                    return;
                }
                // The connection was aborted
                if (connection.state === signalR.connectionState.disconnected) {
                    return;
                }
                var transportName = transports[index],
                    transport = signalR.transports[transportName],
                    onFallback = function () {
                        initialize(transports, index + 1);
                    };
                connection.transport = transport;
                try {
                    connection._.initHandler.start(transport, function () { // success
                        // Firefox 11+ doesn't allow sync XHR withCredentials: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#withCredentials
                        var isFirefox11OrGreater = signalR._.firefoxMajorVersion(window.navigator.userAgent) >= 11,
                            asyncAbort = !!connection.withCredentials && isFirefox11OrGreater;
                        connection.log("The start request succeeded. Transitioning to the connected state.");
                        if (supportsKeepAlive(connection)) {
                            signalR.transports._logic.monitorKeepAlive(connection);
                        }
                        signalR.transports._logic.startHeartbeat(connection);
                        // Used to ensure low activity clients maintain their authentication.
                        // Must be configured once a transport has been decided to perform valid ping requests.
                        signalR._.configurePingInterval(connection);
                        if (!changeState(connection,
                                            signalR.connectionState.connecting,
                                            signalR.connectionState.connected)) {
                            connection.log("WARNING! The connection was not in the connecting state.");
                        }
                        // Drain any incoming buffered messages (messages that came in prior to connect)
                        connection._.connectingMessageBuffer.drain();
                        $(connection).triggerHandler(events.onStart);
                        // wire the stop handler for when the user leaves the page
                        _pageWindow.bind("unload", function () {
                            connection.log("Window unloading, stopping the connection.");
                            connection.stop(asyncAbort);
                        });
                        if (isFirefox11OrGreater) {
                            // Firefox does not fire cross-domain XHRs in the normal unload handler on tab close.
                            // #2400
                            _pageWindow.bind("beforeunload", function () {
                                // If connection.stop() runs runs in beforeunload and fails, it will also fail
                                // in unload unless connection.stop() runs after a timeout.
                                window.setTimeout(function () {
                                    connection.stop(asyncAbort);
                                }, 0);
                            });
                        }
                    }, onFallback);
                }
                catch (error) {
                    connection.log(transport.name + " transport threw '" + error.message + "' when attempting to start.");
                    onFallback();
                }
            };
            var url = connection.url + "/negotiate",
                onFailed = function (error, connection) {
                    var err = signalR._.error(resources.errorOnNegotiate, error, connection._.negotiateRequest);
                    $(connection).triggerHandler(events.onError, err);
                    deferred.reject(err);
                    // Stop the connection if negotiate failed
                    connection.stop();
                };
            $(connection).triggerHandler(events.onStarting);
            url = signalR.transports._logic.prepareQueryString(connection, url);
            connection.log("Negotiating with '" + url + "'.");
            // Save the ajax negotiate request object so we can abort it if stop is called while the request is in flight.
            connection._.negotiateRequest = signalR.transports._logic.ajax(connection, {
                url: url,
                error: function (error, statusText) {
                    // We don't want to cause any errors if we're aborting our own negotiate request.
                    if (statusText !== _negotiateAbortText) {
                        onFailed(error, connection);
                    } else {
                        // This rejection will noop if the deferred has already been resolved or rejected.
                        deferred.reject(signalR._.error(resources.stoppedWhileNegotiating, null /* error */, connection._.negotiateRequest));
                    }
                },
                success: function (result) {
                    var res,
                        keepAliveData,
                        protocolError,
                        transports = [],
                        supportedTransports = [];
                    try {
                        res = connection._parseResponse(result);
                    } catch (error) {
                        onFailed(signalR._.error(resources.errorParsingNegotiateResponse, error), connection);
                        return;
                    }
                    keepAliveData = connection._.keepAliveData;
                    connection.appRelativeUrl = res.Url;
                    connection.id = res.ConnectionId;
                    connection.token = res.ConnectionToken;
                    connection.webSocketServerUrl = res.WebSocketServerUrl;
                    // The long poll timeout is the ConnectionTimeout plus 10 seconds
                    connection._.pollTimeout = res.ConnectionTimeout * 1000 + 10000; // in ms
                    // Once the server has labeled the PersistentConnection as Disconnected, we should stop attempting to reconnect
                    // after res.DisconnectTimeout seconds.
                    connection.disconnectTimeout = res.DisconnectTimeout * 1000; // in ms
                    // Add the TransportConnectTimeout from the response to the transportConnectTimeout from the client to calculate the total timeout
                    connection._.totalTransportConnectTimeout = connection.transportConnectTimeout + res.TransportConnectTimeout * 1000;
                    // If we have a keep alive
                    if (res.KeepAliveTimeout) {
                        // Register the keep alive data as activated
                        keepAliveData.activated = true;
                        // Timeout to designate when to force the connection into reconnecting converted to milliseconds
                        keepAliveData.timeout = res.KeepAliveTimeout * 1000;
                        // Timeout to designate when to warn the developer that the connection may be dead or is not responding.
                        keepAliveData.timeoutWarning = keepAliveData.timeout * connection.keepAliveWarnAt;
                        // Instantiate the frequency in which we check the keep alive.  It must be short in order to not miss/pick up any changes
                        connection._.beatInterval = (keepAliveData.timeout - keepAliveData.timeoutWarning) / 3;
                    } else {
                        keepAliveData.activated = false;
                    }
                    connection.reconnectWindow = connection.disconnectTimeout + (keepAliveData.timeout || 0);
                    if (!res.ProtocolVersion || res.ProtocolVersion !== connection.clientProtocol) {
                        protocolError = signalR._.error(signalR._.format(resources.protocolIncompatible, connection.clientProtocol, res.ProtocolVersion));
                        $(connection).triggerHandler(events.onError, [protocolError]);
                        deferred.reject(protocolError);
                        return;
                    }
                    $.each(signalR.transports, function (key) {
                        if ((key.indexOf("_") === 0) || (key === "webSockets" && !res.TryWebSockets)) {
                            return true;
                        }
                        supportedTransports.push(key);
                    });
                    if ($.isArray(config.transport)) {
                        $.each(config.transport, function (_, transport) {
                            if ($.inArray(transport, supportedTransports) >= 0) {
                                transports.push(transport);
                            }
                        });
                    } else if (config.transport === "auto") {
                        transports = supportedTransports;
                    } else if ($.inArray(config.transport, supportedTransports) >= 0) {
                        transports.push(config.transport);
                    }
                    initialize(transports);
                }
            });
            return deferred.promise();
        },
        starting: function (callback) {
            /// <summary>Adds a callback that will be invoked before anything is sent over the connection</summary>
            /// <param name="callback" type="Function">A callback function to execute before the connection is fully instantiated.</param>
            /// <returns type="signalR" />
            var connection = this;
            $(connection).bind(events.onStarting, function (e, data) {
                callback.call(connection);
            });
            return connection;
        },
        send: function (data) {
            /// <summary>Sends data over the connection</summary>
            /// <param name="data" type="String">The data to send over the connection</param>
            /// <returns type="signalR" />
            var connection = this;
            if (connection.state === signalR.connectionState.disconnected) {
                // Connection hasn't been started yet
                throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");
            }
            if (connection.state === signalR.connectionState.connecting) {
                // Connection hasn't been started yet
                throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");
            }
            connection.transport.send(connection, data);
            // REVIEW: Should we return deferred here?
            return connection;
        },
        received: function (callback) {
            /// <summary>Adds a callback that will be invoked after anything is received over the connection</summary>
            /// <param name="callback" type="Function">A callback function to execute when any data is received on the connection</param>
            /// <returns type="signalR" />
            var connection = this;
            $(connection).bind(events.onReceived, function (e, data) {
                callback.call(connection, data);
            });
            return connection;
        },
        stateChanged: function (callback) {
            /// <summary>Adds a callback that will be invoked when the connection state changes</summary>
            /// <param name="callback" type="Function">A callback function to execute when the connection state changes</param>
            /// <returns type="signalR" />
            var connection = this;
            $(connection).bind(events.onStateChanged, function (e, data) {
                callback.call(connection, data);
            });
            return connection;
        },
        error: function (callback) {
            /// <summary>Adds a callback that will be invoked after an error occurs with the connection</summary>
            /// <param name="callback" type="Function">A callback function to execute when an error occurs on the connection</param>
            /// <returns type="signalR" />
            var connection = this;
            $(connection).bind(events.onError, function (e, errorData, sendData) {
                connection.lastError = errorData;
                // In practice 'errorData' is the SignalR built error object.
                // In practice 'sendData' is undefined for all error events except those triggered by
                // 'ajaxSend' and 'webSockets.send'.'sendData' is the original send payload.
                callback.call(connection, errorData, sendData);
            });
            return connection;
        },
        disconnected: function (callback) {
            /// <summary>Adds a callback that will be invoked when the client disconnects</summary>
            /// <param name="callback" type="Function">A callback function to execute when the connection is broken</param>
            /// <returns type="signalR" />
            var connection = this;
            $(connection).bind(events.onDisconnect, function (e, data) {
                callback.call(connection);
            });
            return connection;
        },
        connectionSlow: function (callback) {
            /// <summary>Adds a callback that will be invoked when the client detects a slow connection</summary>
            /// <param name="callback" type="Function">A callback function to execute when the connection is slow</param>
            /// <returns type="signalR" />
            var connection = this;
            $(connection).bind(events.onConnectionSlow, function (e, data) {
                callback.call(connection);
            });
            return connection;
        },
        reconnecting: function (callback) {
            /// <summary>Adds a callback that will be invoked when the underlying transport begins reconnecting</summary>
            /// <param name="callback" type="Function">A callback function to execute when the connection enters a reconnecting state</param>
            /// <returns type="signalR" />
            var connection = this;
            $(connection).bind(events.onReconnecting, function (e, data) {
                callback.call(connection);
            });
            return connection;
        },
        reconnected: function (callback) {
            /// <summary>Adds a callback that will be invoked when the underlying transport reconnects</summary>
            /// <param name="callback" type="Function">A callback function to execute when the connection is restored</param>
            /// <returns type="signalR" />
            var connection = this;
            $(connection).bind(events.onReconnect, function (e, data) {
                callback.call(connection);
            });
            return connection;
        },
        stop: function (async, notifyServer) {
            /// <summary>Stops listening</summary>
            /// <param name="async" type="Boolean">Whether or not to asynchronously abort the connection</param>
            /// <param name="notifyServer" type="Boolean">Whether we want to notify the server that we are aborting the connection</param>
            /// <returns type="signalR" />
            var connection = this,
                // Save deferral because this is always cleaned up
                deferral = connection._deferral;
            // Verify that we've bound a load event.
            if (connection._.deferredStartHandler) {
                // Unbind the event.
                _pageWindow.unbind("load", connection._.deferredStartHandler);
            }
            // Always clean up private non-timeout based state.
            delete connection._.config;
            delete connection._.deferredStartHandler;
            // This needs to be checked despite the connection state because a connection start can be deferred until page load.
            // If we've deferred the start due to a page load we need to unbind the "onLoad" -> start event.
            if (!_pageLoaded && (!connection._.config || connection._.config.waitForPageLoad === true)) {
                connection.log("Stopping connection prior to negotiate.");
                // If we have a deferral we should reject it
                if (deferral) {
                    deferral.reject(signalR._.error(resources.stoppedWhileLoading));
                }
                // Short-circuit because the start has not been fully started.
                return;
            }
            if (connection.state === signalR.connectionState.disconnected) {
                return;
            }
            connection.log("Stopping connection.");
            // Clear this no matter what
            window.clearTimeout(connection._.beatHandle);
            window.clearInterval(connection._.pingIntervalId);
            if (connection.transport) {
                connection.transport.stop(connection);
                if (notifyServer !== false) {
                    connection.transport.abort(connection, async);
                }
                if (supportsKeepAlive(connection)) {
                    signalR.transports._logic.stopMonitoringKeepAlive(connection);
                }
                connection.transport = null;
            }
            if (connection._.negotiateRequest) {
                // If the negotiation request has already completed this will noop.
                connection._.negotiateRequest.abort(_negotiateAbortText);
                delete connection._.negotiateRequest;
            }
            // Ensure that initHandler.stop() is called before connection._deferral is deleted
            if (connection._.initHandler) {
                connection._.initHandler.stop();
            }
            delete connection._deferral;
            delete connection.messageId;
            delete connection.groupsToken;
            delete connection.id;
            delete connection._.pingIntervalId;
            delete connection._.lastMessageAt;
            delete connection._.lastActiveAt;
            // Clear out our message buffer
            connection._.connectingMessageBuffer.clear();
            // Clean up this event
            $(connection).unbind(events.onStart);
            // Trigger the disconnect event
            changeState(connection, connection.state, signalR.connectionState.disconnected);
            $(connection).triggerHandler(events.onDisconnect);
            return connection;
        },
        log: function (msg) {
            log(msg, this.logging);
        }
    };
    signalR.fn.init.prototype = signalR.fn;
    signalR.noConflict = function () {
        /// <summary>Reinstates the original value of $.connection and returns the signalR object for manual assignment</summary>
        /// <returns type="signalR" />
        if ($.connection === signalR) {
            $.connection = _connection;
        }
        return signalR;
    };
    if ($.connection) {
        _connection = $.connection;
    }
    $.connection = $.signalR = signalR;
}(window.jQuery, window));
/* jquery.signalR.transports.common.js */
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*global window:false */
/// <reference path="jquery.signalR.core.js" />
(function ($, window, undefined) {
    var signalR = $.signalR,
        events = $.signalR.events,
        changeState = $.signalR.changeState,
        startAbortText = "__Start Aborted__",
        transportLogic;
    signalR.transports = {};
    function beat(connection) {
        if (connection._.keepAliveData.monitoring) {
            checkIfAlive(connection);
        }
        // Ensure that we successfully marked active before continuing the heartbeat.
        if (transportLogic.markActive(connection)) {
            connection._.beatHandle = window.setTimeout(function () {
                beat(connection);
            }, connection._.beatInterval);
        }
    }
    function checkIfAlive(connection) {
        var keepAliveData = connection._.keepAliveData,
            timeElapsed;
        // Only check if we're connected
        if (connection.state === signalR.connectionState.connected) {
            timeElapsed = new Date().getTime() - connection._.lastMessageAt;
            // Check if the keep alive has completely timed out
            if (timeElapsed >= keepAliveData.timeout) {
                connection.log("Keep alive timed out.  Notifying transport that connection has been lost.");
                // Notify transport that the connection has been lost
                connection.transport.lostConnection(connection);
            } else if (timeElapsed >= keepAliveData.timeoutWarning) {
                // This is to assure that the user only gets a single warning
                if (!keepAliveData.userNotified) {
                    connection.log("Keep alive has been missed, connection may be dead/slow.");
                    $(connection).triggerHandler(events.onConnectionSlow);
                    keepAliveData.userNotified = true;
                }
            } else {
                keepAliveData.userNotified = false;
            }
        }
    }
    function getAjaxUrl(connection, path) {
        var url = connection.url + path;
        if (connection.transport) {
            url += "?transport=" + connection.transport.name;
        }
        return transportLogic.prepareQueryString(connection, url);
    }
    function InitHandler(connection) {
        this.connection = connection;
        this.startRequested = false;
        this.startCompleted = false;
        this.connectionStopped = false;
    }
    InitHandler.prototype = {
        start: function (transport, onSuccess, onFallback) {
            var that = this,
                connection = that.connection,
                failCalled = false;
            if (that.startRequested || that.connectionStopped) {
                connection.log("WARNING! " + transport.name + " transport cannot be started. Initialization ongoing or completed.");
                return;
            }
            connection.log(transport.name + " transport starting.");
            transport.start(connection, function () {
                if (!failCalled) {
                    that.initReceived(transport, onSuccess);
                }
            }, function (error) {
                // Don't allow the same transport to cause onFallback to be called twice
                if (!failCalled) {
                    failCalled = true;
                    that.transportFailed(transport, error, onFallback);
                }
                // Returns true if the transport should stop;
                // false if it should attempt to reconnect
                return !that.startCompleted || that.connectionStopped;
            });
            that.transportTimeoutHandle = window.setTimeout(function () {
                if (!failCalled) {
                    failCalled = true;
                    connection.log(transport.name + " transport timed out when trying to connect.");
                    that.transportFailed(transport, undefined, onFallback);
                }
            }, connection._.totalTransportConnectTimeout);
        },
        stop: function () {
            this.connectionStopped = true;
            window.clearTimeout(this.transportTimeoutHandle);
            signalR.transports._logic.tryAbortStartRequest(this.connection);
        },
        initReceived: function (transport, onSuccess) {
            var that = this,
                connection = that.connection;
            if (that.startRequested) {
                connection.log("WARNING! The client received multiple init messages.");
                return;
            }
            if (that.connectionStopped) {
                return;
            }
            that.startRequested = true;
            window.clearTimeout(that.transportTimeoutHandle);
            connection.log(transport.name + " transport connected. Initiating start request.");
            signalR.transports._logic.ajaxStart(connection, function () {
                that.startCompleted = true;
                onSuccess();
            });
        },
        transportFailed: function (transport, error, onFallback) {
            var connection = this.connection,
                deferred = connection._deferral,
                wrappedError;
            if (this.connectionStopped) {
                return;
            }
            window.clearTimeout(this.transportTimeoutHandle);
            if (!this.startRequested) {
                transport.stop(connection);
                connection.log(transport.name + " transport failed to connect. Attempting to fall back.");
                onFallback();
            } else if (!this.startCompleted) {
                // Do not attempt to fall back if a start request is ongoing during a transport failure.
                // Instead, trigger an error and stop the connection.
                wrappedError = signalR._.error(signalR.resources.errorDuringStartRequest, error);
                connection.log(transport.name + " transport failed during the start request. Stopping the connection.");
                $(connection).triggerHandler(events.onError, [wrappedError]);
                if (deferred) {
                    deferred.reject(wrappedError);
                }
                connection.stop();
            } else {
                // The start request has completed, but the connection has not stopped.
                // No need to do anything here. The transport should attempt its normal reconnect logic.
            }
        }
    };
    transportLogic = signalR.transports._logic = {
        ajax: function (connection, options) {
            return $.ajax(
                $.extend(/*deep copy*/ true, {}, $.signalR.ajaxDefaults, {
                    type: "GET",
                    data: {},
                    xhrFields: { withCredentials: connection.withCredentials },
                    contentType: connection.contentType,
                    dataType: connection.ajaxDataType
                }, options));
        },
        pingServer: function (connection) {
            /// <summary>Pings the server</summary>
            /// <param name="connection" type="signalr">Connection associated with the server ping</param>
            /// <returns type="signalR" />
            var url,
                xhr,
                deferral = $.Deferred();
            if (connection.transport) {
                url = connection.url + "/ping";
                url = transportLogic.addQs(url, connection.qs);
                xhr = transportLogic.ajax(connection, {
                    url: url,
                    success: function (result) {
                        var data;
                        try {
                            data = connection._parseResponse(result);
                        }
                        catch (error) {
                            deferral.reject(
                                signalR._.transportError(
                                    signalR.resources.pingServerFailedParse,
                                    connection.transport,
                                    error,
                                    xhr
                                )
                            );
                            connection.stop();
                            return;
                        }
                        if (data.Response === "pong") {
                            deferral.resolve();
                        }
                        else {
                            deferral.reject(
                                signalR._.transportError(
                                    signalR._.format(signalR.resources.pingServerFailedInvalidResponse, result),
                                    connection.transport,
                                    null /* error */,
                                    xhr
                                )
                            );
                        }
                    },
                    error: function (error) {
                        if (error.status === 401 || error.status === 403) {
                            deferral.reject(
                                signalR._.transportError(
                                    signalR._.format(signalR.resources.pingServerFailedStatusCode, error.status),
                                    connection.transport,
                                    error,
                                    xhr
                                )
                            );
                            connection.stop();
                        }
                        else {
                            deferral.reject(
                                signalR._.transportError(
                                    signalR.resources.pingServerFailed,
                                    connection.transport,
                                    error,
                                    xhr
                                )
                            );
                        }
                    }
                });
            }
            else {
                deferral.reject(
                    signalR._.transportError(
                        signalR.resources.noConnectionTransport,
                        connection.transport
                    )
                );
            }
            return deferral.promise();
        },
        prepareQueryString: function (connection, url) {
            var preparedUrl;
            // Use addQs to start since it handles the ?/& prefix for us
            preparedUrl = transportLogic.addQs(url, "clientProtocol=" + connection.clientProtocol);
            // Add the user-specified query string params if any
            preparedUrl = transportLogic.addQs(preparedUrl, connection.qs);
            if (connection.token) {
                preparedUrl += "&connectionToken=" + window.encodeURIComponent(connection.token);
            }
            if (connection.data) {
                preparedUrl += "&connectionData=" + window.encodeURIComponent(connection.data);
            }
            return preparedUrl;
        },
        addQs: function (url, qs) {
            var appender = url.indexOf("?") !== -1 ? "&" : "?",
                firstChar;
            if (!qs) {
                return url;
            }
            if (typeof (qs) === "object") {
                return url + appender + $.param(qs);
            }
            if (typeof (qs) === "string") {
                firstChar = qs.charAt(0);
                if (firstChar === "?" || firstChar === "&") {
                    appender = "";
                }
                return url + appender + qs;
            }
            throw new Error("Query string property must be either a string or object.");
        },
        // BUG #2953: The url needs to be same otherwise it will cause a memory leak
        getUrl: function (connection, transport, reconnecting, poll, ajaxPost) {
            /// <summary>Gets the url for making a GET based connect request</summary>
            var baseUrl = transport === "webSockets" ? "" : connection.baseUrl,
                url = baseUrl + connection.appRelativeUrl,
                qs = "transport=" + transport;
            if (!ajaxPost && connection.groupsToken) {
                qs += "&groupsToken=" + window.encodeURIComponent(connection.groupsToken);
            }
            if (!reconnecting) {
                url += "/connect";
            } else {
                if (poll) {
                    // longPolling transport specific
                    url += "/poll";
                } else {
                    url += "/reconnect";
                }
                if (!ajaxPost && connection.messageId) {
                    qs += "&messageId=" + window.encodeURIComponent(connection.messageId);
                }
            }
            url += "?" + qs;
            url = transportLogic.prepareQueryString(connection, url);
            if (!ajaxPost) {
                url += "&tid=" + Math.floor(Math.random() * 11);
            }
            return url;
        },
        maximizePersistentResponse: function (minPersistentResponse) {
            return {
                MessageId: minPersistentResponse.C,
                Messages: minPersistentResponse.M,
                Initialized: typeof (minPersistentResponse.S) !== "undefined" ? true : false,
                ShouldReconnect: typeof (minPersistentResponse.T) !== "undefined" ? true : false,
                LongPollDelay: minPersistentResponse.L,
                GroupsToken: minPersistentResponse.G
            };
        },
        updateGroups: function (connection, groupsToken) {
            if (groupsToken) {
                connection.groupsToken = groupsToken;
            }
        },
        stringifySend: function (connection, message) {
            if (typeof (message) === "string" || typeof (message) === "undefined" || message === null) {
                return message;
            }
            return connection.json.stringify(message);
        },
        ajaxSend: function (connection, data) {
            var payload = transportLogic.stringifySend(connection, data),
                url = getAjaxUrl(connection, "/send"),
                xhr,
                onFail = function (error, connection) {
                    $(connection).triggerHandler(events.onError, [signalR._.transportError(signalR.resources.sendFailed, connection.transport, error, xhr), data]);
                };
            xhr = transportLogic.ajax(connection, {
                url: url,
                type: connection.ajaxDataType === "jsonp" ? "GET" : "POST",
                contentType: signalR._.defaultContentType,
                data: {
                    data: payload
                },
                success: function (result) {
                    var res;
                    if (result) {
                        try {
                            res = connection._parseResponse(result);
                        }
                        catch (error) {
                            onFail(error, connection);
                            connection.stop();
                            return;
                        }
                        transportLogic.triggerReceived(connection, res);
                    }
                },
                error: function (error, textStatus) {
                    if (textStatus === "abort" || textStatus === "parsererror") {
                        // The parsererror happens for sends that don't return any data, and hence
                        // don't write the jsonp callback to the response. This is harder to fix on the server
                        // so just hack around it on the client for now.
                        return;
                    }
                    onFail(error, connection);
                }
            });
            return xhr;
        },
        ajaxAbort: function (connection, async) {
            if (typeof (connection.transport) === "undefined") {
                return;
            }
            // Async by default unless explicitly overidden
            async = typeof async === "undefined" ? true : async;
            var url = getAjaxUrl(connection, "/abort");
            transportLogic.ajax(connection, {
                url: url,
                async: async,
                timeout: 1000,
                type: "POST"
            });
            connection.log("Fired ajax abort async = " + async + ".");
        },
        ajaxStart: function (connection, onSuccess) {
            var rejectDeferred = function (error) {
                    var deferred = connection._deferral;
                    if (deferred) {
                        deferred.reject(error);
                    }
                },
                triggerStartError = function (error) {
                    connection.log("The start request failed. Stopping the connection.");
                    $(connection).triggerHandler(events.onError, [error]);
                    rejectDeferred(error);
                    connection.stop();
                };
            connection._.startRequest = transportLogic.ajax(connection, {
                url: getAjaxUrl(connection, "/start"),
                success: function (result, statusText, xhr) {
                    var data;
                    try {
                        data = connection._parseResponse(result);
                    } catch (error) {
                        triggerStartError(signalR._.error(
                            signalR._.format(signalR.resources.errorParsingStartResponse, result),
                            error, xhr));
                        return;
                    }
                    if (data.Response === "started") {
                        onSuccess();
                    } else {
                        triggerStartError(signalR._.error(
                            signalR._.format(signalR.resources.invalidStartResponse, result),
                            null /* error */, xhr));
                    }
                },
                error: function (xhr, statusText, error) {
                    if (statusText !== startAbortText) {
                        triggerStartError(signalR._.error(
                            signalR.resources.errorDuringStartRequest,
                            error, xhr));
                    } else {
                        // Stop has been called, no need to trigger the error handler
                        // or stop the connection again with onStartError
                        connection.log("The start request aborted because connection.stop() was called.");
                        rejectDeferred(signalR._.error(
                            signalR.resources.stoppedDuringStartRequest,
                            null /* error */, xhr));
                    }
                }
            });
        },
        tryAbortStartRequest: function (connection) {
            if (connection._.startRequest) {
                // If the start request has already completed this will noop.
                connection._.startRequest.abort(startAbortText);
                delete connection._.startRequest;
            }
        },
        tryInitialize: function (connection, persistentResponse, onInitialized) {
            if (persistentResponse.Initialized && onInitialized) {
                onInitialized();
            } else if (persistentResponse.Initialized) {
                connection.log("WARNING! The client received an init message after reconnecting.");
            }
        },
        triggerReceived: function (connection, data) {
            if (!connection._.connectingMessageBuffer.tryBuffer(data)) {
                $(connection).triggerHandler(events.onReceived, [data]);
            }
        },
        processMessages: function (connection, minData, onInitialized) {
            var data;
            // Update the last message time stamp
            transportLogic.markLastMessage(connection);
            if (minData) {
                data = transportLogic.maximizePersistentResponse(minData);
                transportLogic.updateGroups(connection, data.GroupsToken);
                if (data.MessageId) {
                    connection.messageId = data.MessageId;
                }
                if (data.Messages) {
                    $.each(data.Messages, function (index, message) {
                        transportLogic.triggerReceived(connection, message);
                    });
                    transportLogic.tryInitialize(connection, data, onInitialized);
                }
            }
        },
        monitorKeepAlive: function (connection) {
            var keepAliveData = connection._.keepAliveData;
            // If we haven't initiated the keep alive timeouts then we need to
            if (!keepAliveData.monitoring) {
                keepAliveData.monitoring = true;
                transportLogic.markLastMessage(connection);
                // Save the function so we can unbind it on stop
                connection._.keepAliveData.reconnectKeepAliveUpdate = function () {
                    // Mark a new message so that keep alive doesn't time out connections
                    transportLogic.markLastMessage(connection);
                };
                // Update Keep alive on reconnect
                $(connection).bind(events.onReconnect, connection._.keepAliveData.reconnectKeepAliveUpdate);
                connection.log("Now monitoring keep alive with a warning timeout of " + keepAliveData.timeoutWarning + ", keep alive timeout of " + keepAliveData.timeout + " and disconnecting timeout of " + connection.disconnectTimeout);
            } else {
                connection.log("Tried to monitor keep alive but it's already being monitored.");
            }
        },
        stopMonitoringKeepAlive: function (connection) {
            var keepAliveData = connection._.keepAliveData;
            // Only attempt to stop the keep alive monitoring if its being monitored
            if (keepAliveData.monitoring) {
                // Stop monitoring
                keepAliveData.monitoring = false;
                // Remove the updateKeepAlive function from the reconnect event
                $(connection).unbind(events.onReconnect, connection._.keepAliveData.reconnectKeepAliveUpdate);
                // Clear all the keep alive data
                connection._.keepAliveData = {};
                connection.log("Stopping the monitoring of the keep alive.");
            }
        },
        startHeartbeat: function (connection) {
            connection._.lastActiveAt = new Date().getTime();
            beat(connection);
        },
        markLastMessage: function (connection) {
            connection._.lastMessageAt = new Date().getTime();
        },
        markActive: function (connection) {
            if (transportLogic.verifyLastActive(connection)) {
                connection._.lastActiveAt = new Date().getTime();
                return true;
            }
            return false;
        },
        isConnectedOrReconnecting: function (connection) {
            return connection.state === signalR.connectionState.connected ||
                   connection.state === signalR.connectionState.reconnecting;
        },
        ensureReconnectingState: function (connection) {
            if (changeState(connection,
                        signalR.connectionState.connected,
                        signalR.connectionState.reconnecting) === true) {
                $(connection).triggerHandler(events.onReconnecting);
            }
            return connection.state === signalR.connectionState.reconnecting;
        },
        clearReconnectTimeout: function (connection) {
            if (connection && connection._.reconnectTimeout) {
                window.clearTimeout(connection._.reconnectTimeout);
                delete connection._.reconnectTimeout;
            }
        },
        verifyLastActive: function (connection) {
            if (new Date().getTime() - connection._.lastActiveAt >= connection.reconnectWindow) {
                var message = signalR._.format(signalR.resources.reconnectWindowTimeout, new Date(connection._.lastActiveAt), connection.reconnectWindow);
                connection.log(message);
                $(connection).triggerHandler(events.onError, [signalR._.error(message, /* source */ "TimeoutException")]);
                connection.stop(/* async */ false, /* notifyServer */ false);
                return false;
            }
            return true;
        },
        reconnect: function (connection, transportName) {
            var transport = signalR.transports[transportName];
            // We should only set a reconnectTimeout if we are currently connected
            // and a reconnectTimeout isn't already set.
            if (transportLogic.isConnectedOrReconnecting(connection) && !connection._.reconnectTimeout) {
                // Need to verify before the setTimeout occurs because an application sleep could occur during the setTimeout duration.
                if (!transportLogic.verifyLastActive(connection)) {
                    return;
                }
                connection._.reconnectTimeout = window.setTimeout(function () {
                    if (!transportLogic.verifyLastActive(connection)) {
                        return;
                    }
                    transport.stop(connection);
                    if (transportLogic.ensureReconnectingState(connection)) {
                        connection.log(transportName + " reconnecting.");
                        transport.start(connection);
                    }
                }, connection.reconnectDelay);
            }
        },
        handleParseFailure: function (connection, result, error, onFailed, context) {
            var wrappedError = signalR._.transportError(
                signalR._.format(signalR.resources.parseFailed, result),
                connection.transport,
                error,
                context);
            // If we're in the initialization phase trigger onFailed, otherwise stop the connection.
            if (onFailed && onFailed(wrappedError)) {
                connection.log("Failed to parse server response while attempting to connect.");
            } else {
                $(connection).triggerHandler(events.onError, [wrappedError]);
                connection.stop();
            }
        },
        initHandler: function (connection) {
            return new InitHandler(connection);
        },
        foreverFrame: {
            count: 0,
            connections: {}
        }
    };
}(window.jQuery, window));
/* jquery.signalR.transports.webSockets.js */
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*global window:false */
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
    var signalR = $.signalR,
        events = $.signalR.events,
        changeState = $.signalR.changeState,
        transportLogic = signalR.transports._logic;
    signalR.transports.webSockets = {
        name: "webSockets",
        supportsKeepAlive: function () {
            return true;
        },
        send: function (connection, data) {
            var payload = transportLogic.stringifySend(connection, data);
            try {
                connection.socket.send(payload);
            } catch (ex) {
                $(connection).triggerHandler(events.onError,
                    [signalR._.transportError(
                        signalR.resources.webSocketsInvalidState,
                        connection.transport,
                        ex,
                        connection.socket
                    ),
                    data]);
            }
        },
        start: function (connection, onSuccess, onFailed) {
            var url,
                opened = false,
                that = this,
                reconnecting = !onSuccess,
                $connection = $(connection);
            if (!window.WebSocket) {
                onFailed();
                return;
            }
            if (!connection.socket) {
                if (connection.webSocketServerUrl) {
                    url = connection.webSocketServerUrl;
                } else {
                    url = connection.wsProtocol + connection.host;
                }
                url += transportLogic.getUrl(connection, this.name, reconnecting);
                connection.log("Connecting to websocket endpoint '" + url + "'.");
                connection.socket = new window.WebSocket(url);
                connection.socket.onopen = function () {
                    opened = true;
                    connection.log("Websocket opened.");
                    transportLogic.clearReconnectTimeout(connection);
                    if (changeState(connection,
                                    signalR.connectionState.reconnecting,
                                    signalR.connectionState.connected) === true) {
                        $connection.triggerHandler(events.onReconnect);
                    }
                };
                connection.socket.onclose = function (event) {
                    var error;
                    // Only handle a socket close if the close is from the current socket.
                    // Sometimes on disconnect the server will push down an onclose event
                    // to an expired socket.
                    if (this === connection.socket) {
                        if (opened && typeof event.wasClean !== "undefined" && event.wasClean === false) {
                            // Ideally this would use the websocket.onerror handler (rather than checking wasClean in onclose) but
                            // I found in some circumstances Chrome won't call onerror. This implementation seems to work on all browsers.
                            error = signalR._.transportError(
                                signalR.resources.webSocketClosed,
                                connection.transport,
                                event);
                            connection.log("Unclean disconnect from websocket: " + (event.reason || "[no reason given]."));
                        } else {
                            connection.log("Websocket closed.");
                        }
                        if (!onFailed || !onFailed(error)) {
                            if (error) {
                                $(connection).triggerHandler(events.onError, [error]);
                            }
                            that.reconnect(connection);
                        }
                    }
                };
                connection.socket.onmessage = function (event) {
                    var data;
                    try {
                        data = connection._parseResponse(event.data);
                    }
                    catch (error) {
                        transportLogic.handleParseFailure(connection, event.data, error, onFailed, event);
                        return;
                    }
                    if (data) {
                        // data.M is PersistentResponse.Messages
                        if ($.isEmptyObject(data) || data.M) {
                            transportLogic.processMessages(connection, data, onSuccess);
                        } else {
                            // For websockets we need to trigger onReceived
                            // for callbacks to outgoing hub calls.
                            transportLogic.triggerReceived(connection, data);
                        }
                    }
                };
            }
        },
        reconnect: function (connection) {
            transportLogic.reconnect(connection, this.name);
        },
        lostConnection: function (connection) {
            this.reconnect(connection);
        },
        stop: function (connection) {
            // Don't trigger a reconnect after stopping
            transportLogic.clearReconnectTimeout(connection);
            if (connection.socket) {
                connection.log("Closing the Websocket.");
                connection.socket.close();
                connection.socket = null;
            }
        },
        abort: function (connection, async) {
            transportLogic.ajaxAbort(connection, async);
        }
    };
}(window.jQuery, window));
/* jquery.signalR.transports.serverSentEvents.js */
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*global window:false */
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
    var signalR = $.signalR,
        events = $.signalR.events,
        changeState = $.signalR.changeState,
        transportLogic = signalR.transports._logic,
        clearReconnectAttemptTimeout = function (connection) {
            window.clearTimeout(connection._.reconnectAttemptTimeoutHandle);
            delete connection._.reconnectAttemptTimeoutHandle;
        };
    signalR.transports.serverSentEvents = {
        name: "serverSentEvents",
        supportsKeepAlive: function () {
            return true;
        },
        timeOut: 3000,
        start: function (connection, onSuccess, onFailed) {
            var that = this,
                opened = false,
                $connection = $(connection),
                reconnecting = !onSuccess,
                url;
            if (connection.eventSource) {
                connection.log("The connection already has an event source. Stopping it.");
                connection.stop();
            }
            if (!window.EventSource) {
                if (onFailed) {
                    connection.log("This browser doesn't support SSE.");
                    onFailed();
                }
                return;
            }
            url = transportLogic.getUrl(connection, this.name, reconnecting);
            try {
                connection.log("Attempting to connect to SSE endpoint '" + url + "'.");
                connection.eventSource = new window.EventSource(url, { withCredentials: connection.withCredentials });
            }
            catch (e) {
                connection.log("EventSource failed trying to connect with error " + e.Message + ".");
                if (onFailed) {
                    // The connection failed, call the failed callback
                    onFailed();
                } else {
                    $connection.triggerHandler(events.onError, [signalR._.transportError(signalR.resources.eventSourceFailedToConnect, connection.transport, e)]);
                    if (reconnecting) {
                        // If we were reconnecting, rather than doing initial connect, then try reconnect again
                        that.reconnect(connection);
                    }
                }
                return;
            }
            if (reconnecting) {
                connection._.reconnectAttemptTimeoutHandle = window.setTimeout(function () {
                    if (opened === false) {
                        // If we're reconnecting and the event source is attempting to connect,
                        // don't keep retrying. This causes duplicate connections to spawn.
                        if (connection.eventSource.readyState !== window.EventSource.OPEN) {
                            // If we were reconnecting, rather than doing initial connect, then try reconnect again
                            that.reconnect(connection);
                        }
                    }
                },
                that.timeOut);
            }
            connection.eventSource.addEventListener("open", function (e) {
                connection.log("EventSource connected.");
                clearReconnectAttemptTimeout(connection);
                transportLogic.clearReconnectTimeout(connection);
                if (opened === false) {
                    opened = true;
                    if (changeState(connection,
                                         signalR.connectionState.reconnecting,
                                         signalR.connectionState.connected) === true) {
                        $connection.triggerHandler(events.onReconnect);
                    }
                }
            }, false);
            connection.eventSource.addEventListener("message", function (e) {
                var res;
                // process messages
                if (e.data === "initialized") {
                    return;
                }
                try {
                    res = connection._parseResponse(e.data);
                }
                catch (error) {
                    transportLogic.handleParseFailure(connection, e.data, error, onFailed, e);
                    return;
                }
                transportLogic.processMessages(connection, res, onSuccess);
            }, false);
            connection.eventSource.addEventListener("error", function (e) {
                var error = signalR._.transportError(
                    signalR.resources.eventSourceError,
                    connection.transport,
                    e);
                // Only handle an error if the error is from the current Event Source.
                // Sometimes on disconnect the server will push down an error event
                // to an expired Event Source.
                if (this !== connection.eventSource) {
                    return;
                }
                if (onFailed && onFailed(error)) {
                    return;
                }
                connection.log("EventSource readyState: " + connection.eventSource.readyState + ".");
                if (e.eventPhase === window.EventSource.CLOSED) {
                    // We don't use the EventSource's native reconnect function as it
                    // doesn't allow us to change the URL when reconnecting. We need
                    // to change the URL to not include the /connect suffix, and pass
                    // the last message id we received.
                    connection.log("EventSource reconnecting due to the server connection ending.");
                    that.reconnect(connection);
                } else {
                    // connection error
                    connection.log("EventSource error.");
                    $connection.triggerHandler(events.onError, [error]);
                }
            }, false);
        },
        reconnect: function (connection) {
            transportLogic.reconnect(connection, this.name);
        },
        lostConnection: function (connection) {
            this.reconnect(connection);
        },
        send: function (connection, data) {
            transportLogic.ajaxSend(connection, data);
        },
        stop: function (connection) {
            // Don't trigger a reconnect after stopping
            clearReconnectAttemptTimeout(connection);
            transportLogic.clearReconnectTimeout(connection);
            if (connection && connection.eventSource) {
                connection.log("EventSource calling close().");
                connection.eventSource.close();
                connection.eventSource = null;
                delete connection.eventSource;
            }
        },
        abort: function (connection, async) {
            transportLogic.ajaxAbort(connection, async);
        }
    };
}(window.jQuery, window));
/* jquery.signalR.transports.foreverFrame.js */
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*global window:false */
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
    var signalR = $.signalR,
        events = $.signalR.events,
        changeState = $.signalR.changeState,
        transportLogic = signalR.transports._logic,
        createFrame = function () {
            var frame = window.document.createElement("iframe");
            frame.setAttribute("style", "position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;");
            return frame;
        },
        // Used to prevent infinite loading icon spins in older versions of ie
        // We build this object inside a closure so we don't pollute the rest of
        // the foreverFrame transport with unnecessary functions/utilities.
        loadPreventer = (function () {
            var loadingFixIntervalId = null,
                loadingFixInterval = 1000,
                attachedTo = 0;
            return {
                prevent: function () {
                    // Prevent additional iframe removal procedures from newer browsers
                    if (signalR._.ieVersion <= 8) {
                        // We only ever want to set the interval one time, so on the first attachedTo
                        if (attachedTo === 0) {
                            // Create and destroy iframe every 3 seconds to prevent loading icon, super hacky
                            loadingFixIntervalId = window.setInterval(function () {
                                var tempFrame = createFrame();
                                window.document.body.appendChild(tempFrame);
                                window.document.body.removeChild(tempFrame);
                                tempFrame = null;
                            }, loadingFixInterval);
                        }
                        attachedTo++;
                    }
                },
                cancel: function () {
                    // Only clear the interval if there's only one more object that the loadPreventer is attachedTo
                    if (attachedTo === 1) {
                        window.clearInterval(loadingFixIntervalId);
                    }
                    if (attachedTo > 0) {
                        attachedTo--;
                    }
                }
            };
        })();
    signalR.transports.foreverFrame = {
        name: "foreverFrame",
        supportsKeepAlive: function () {
            return true;
        },
        // Added as a value here so we can create tests to verify functionality
        iframeClearThreshold: 50,
        start: function (connection, onSuccess, onFailed) {
            var that = this,
                frameId = (transportLogic.foreverFrame.count += 1),
                url,
                frame = createFrame(),
                frameLoadHandler = function () {
                    connection.log("Forever frame iframe finished loading and is no longer receiving messages.");
                    if (!onFailed || !onFailed()) {
                        that.reconnect(connection);
                    }
                };
            if (window.EventSource) {
                // If the browser supports SSE, don't use Forever Frame
                if (onFailed) {
                    connection.log("Forever Frame is not supported by SignalR on browsers with SSE support.");
                    onFailed();
                }
                return;
            }
            frame.setAttribute("data-signalr-connection-id", connection.id);
            // Start preventing loading icon
            // This will only perform work if the loadPreventer is not attached to another connection.
            loadPreventer.prevent();
            // Build the url
            url = transportLogic.getUrl(connection, this.name);
            url += "&frameId=" + frameId;
            // add frame to the document prior to setting URL to avoid caching issues.
            window.document.documentElement.appendChild(frame);
            connection.log("Binding to iframe's load event.");
            if (frame.addEventListener) {
                frame.addEventListener("load", frameLoadHandler, false);
            } else if (frame.attachEvent) {
                frame.attachEvent("onload", frameLoadHandler);
            }
            frame.src = url;
            transportLogic.foreverFrame.connections[frameId] = connection;
            connection.frame = frame;
            connection.frameId = frameId;
            if (onSuccess) {
                connection.onSuccess = function () {
                    connection.log("Iframe transport started.");
                    onSuccess();
                };
            }
        },
        reconnect: function (connection) {
            var that = this;
            // Need to verify connection state and verify before the setTimeout occurs because an application sleep could occur during the setTimeout duration.
            if (transportLogic.isConnectedOrReconnecting(connection) && transportLogic.verifyLastActive(connection)) {
                window.setTimeout(function () {
                    // Verify that we're ok to reconnect.
                    if (!transportLogic.verifyLastActive(connection)) {
                        return;
                    }
                    if (connection.frame && transportLogic.ensureReconnectingState(connection)) {
                        var frame = connection.frame,
                            src = transportLogic.getUrl(connection, that.name, true) + "&frameId=" + connection.frameId;
                        connection.log("Updating iframe src to '" + src + "'.");
                        frame.src = src;
                    }
                }, connection.reconnectDelay);
            }
        },
        lostConnection: function (connection) {
            this.reconnect(connection);
        },
        send: function (connection, data) {
            transportLogic.ajaxSend(connection, data);
        },
        receive: function (connection, data) {
            var cw,
                body,
                response;
            if (connection.json !== connection._originalJson) {
                // If there's a custom JSON parser configured then serialize the object
                // using the original (browser) JSON parser and then deserialize it using
                // the custom parser (connection._parseResponse does that). This is so we
                // can easily send the response from the server as "raw" JSON but still
                // support custom JSON deserialization in the browser.
                data = connection._originalJson.stringify(data);
            }
            response = connection._parseResponse(data);
            transportLogic.processMessages(connection, response, connection.onSuccess);
            // Protect against connection stopping from a callback trigger within the processMessages above.
            if (connection.state === $.signalR.connectionState.connected) {
                // Delete the script & div elements
                connection.frameMessageCount = (connection.frameMessageCount || 0) + 1;
                if (connection.frameMessageCount > signalR.transports.foreverFrame.iframeClearThreshold) {
                    connection.frameMessageCount = 0;
                    cw = connection.frame.contentWindow || connection.frame.contentDocument;
                    if (cw && cw.document && cw.document.body) {
                        body = cw.document.body;
                        // Remove all the child elements from the iframe's body to conserver memory
                        while (body.firstChild) {
                            body.removeChild(body.firstChild);
                        }
                    }
                }
            }
        },
        stop: function (connection) {
            var cw = null;
            // Stop attempting to prevent loading icon
            loadPreventer.cancel();
            if (connection.frame) {
                if (connection.frame.stop) {
                    connection.frame.stop();
                } else {
                    try {
                        cw = connection.frame.contentWindow || connection.frame.contentDocument;
                        if (cw.document && cw.document.execCommand) {
                            cw.document.execCommand("Stop");
                        }
                    }
                    catch (e) {
                        connection.log("Error occurred when stopping foreverFrame transport. Message = " + e.message + ".");
                    }
                }
                // Ensure the iframe is where we left it
                if (connection.frame.parentNode === window.document.documentElement) {
                    window.document.documentElement.removeChild(connection.frame);
                }
                delete transportLogic.foreverFrame.connections[connection.frameId];
                connection.frame = null;
                connection.frameId = null;
                delete connection.frame;
                delete connection.frameId;
                delete connection.onSuccess;
                delete connection.frameMessageCount;
                connection.log("Stopping forever frame.");
            }
        },
        abort: function (connection, async) {
            transportLogic.ajaxAbort(connection, async);
        },
        getConnection: function (id) {
            return transportLogic.foreverFrame.connections[id];
        },
        started: function (connection) {
            if (changeState(connection,
                signalR.connectionState.reconnecting,
                signalR.connectionState.connected) === true) {
                $(connection).triggerHandler(events.onReconnect);
            }
        }
    };
}(window.jQuery, window));
/* jquery.signalR.transports.longPolling.js */
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*global window:false */
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
    var signalR = $.signalR,
        events = $.signalR.events,
        changeState = $.signalR.changeState,
        isDisconnecting = $.signalR.isDisconnecting,
        transportLogic = signalR.transports._logic;
    signalR.transports.longPolling = {
        name: "longPolling",
        supportsKeepAlive: function () {
            return false;
        },
        reconnectDelay: 3000,
        start: function (connection, onSuccess, onFailed) {
            /// <summary>Starts the long polling connection</summary>
            /// <param name="connection" type="signalR">The SignalR connection to start</param>
            var that = this,
                fireConnect = function () {
                    fireConnect = $.noop;
                    connection.log("LongPolling connected.");
                    if (onSuccess) {
                        onSuccess();
                    } else {
                        connection.log("WARNING! The client received an init message after reconnecting.");
                    }
                },
                tryFailConnect = function (error) {
                    if (onFailed(error)) {
                        connection.log("LongPolling failed to connect.");
                        return true;
                    }
                    return false;
                },
                privateData = connection._,
                reconnectErrors = 0,
                fireReconnected = function (instance) {
                    window.clearTimeout(privateData.reconnectTimeoutId);
                    privateData.reconnectTimeoutId = null;
                    if (changeState(instance,
                                    signalR.connectionState.reconnecting,
                                    signalR.connectionState.connected) === true) {
                        // Successfully reconnected!
                        instance.log("Raising the reconnect event");
                        $(instance).triggerHandler(events.onReconnect);
                    }
                },
                // 1 hour
                maxFireReconnectedTimeout = 3600000;
            if (connection.pollXhr) {
                connection.log("Polling xhr requests already exists, aborting.");
                connection.stop();
            }
            connection.messageId = null;
            privateData.reconnectTimeoutId = null;
            privateData.pollTimeoutId = window.setTimeout(function () {
                (function poll(instance, raiseReconnect) {
                    var messageId = instance.messageId,
                        connect = (messageId === null),
                        reconnecting = !connect,
                        polling = !raiseReconnect,
                        url = transportLogic.getUrl(instance, that.name, reconnecting, polling, true /* use Post for longPolling */),
                        postData = {};
                    if (instance.messageId) {
                        postData.messageId = instance.messageId;
                    }
                    if (instance.groupsToken) {
                        postData.groupsToken = instance.groupsToken;
                    }
                    // If we've disconnected during the time we've tried to re-instantiate the poll then stop.
                    if (isDisconnecting(instance) === true) {
                        return;
                    }
                    connection.log("Opening long polling request to '" + url + "'.");
                    instance.pollXhr = transportLogic.ajax(connection, {
                        xhrFields: {
                            onprogress: function () {
                                transportLogic.markLastMessage(connection);
                            }
                        },
                        url: url,
                        type: "POST",
                        contentType: signalR._.defaultContentType,
                        data: postData,
                        timeout: connection._.pollTimeout,
                        success: function (result) {
                            var minData,
                                delay = 0,
                                data,
                                shouldReconnect;
                            connection.log("Long poll complete.");
                            // Reset our reconnect errors so if we transition into a reconnecting state again we trigger
                            // reconnected quickly
                            reconnectErrors = 0;
                            try {
                                // Remove any keep-alives from the beginning of the result
                                minData = connection._parseResponse(result);
                            }
                            catch (error) {
                                transportLogic.handleParseFailure(instance, result, error, tryFailConnect, instance.pollXhr);
                                return;
                            }
                            // If there's currently a timeout to trigger reconnect, fire it now before processing messages
                            if (privateData.reconnectTimeoutId !== null) {
                                fireReconnected(instance);
                            }
                            if (minData) {
                                data = transportLogic.maximizePersistentResponse(minData);
                            }
                            transportLogic.processMessages(instance, minData, fireConnect);
                            if (data &&
                                $.type(data.LongPollDelay) === "number") {
                                delay = data.LongPollDelay;
                            }
                            if (isDisconnecting(instance) === true) {
                                return;
                            }
                            shouldReconnect = data && data.ShouldReconnect;
                            if (shouldReconnect) {
                                // Transition into the reconnecting state
                                // If this fails then that means that the user transitioned the connection into a invalid state in processMessages.
                                if (!transportLogic.ensureReconnectingState(instance)) {
                                    return;
                                }
                            }
                            // We never want to pass a raiseReconnect flag after a successful poll.  This is handled via the error function
                            if (delay > 0) {
                                privateData.pollTimeoutId = window.setTimeout(function () {
                                    poll(instance, shouldReconnect);
                                }, delay);
                            } else {
                                poll(instance, shouldReconnect);
                            }
                        },
                        error: function (data, textStatus) {
                            var error = signalR._.transportError(signalR.resources.longPollFailed, connection.transport, data, instance.pollXhr);
                            // Stop trying to trigger reconnect, connection is in an error state
                            // If we're not in the reconnect state this will noop
                            window.clearTimeout(privateData.reconnectTimeoutId);
                            privateData.reconnectTimeoutId = null;
                            if (textStatus === "abort") {
                                connection.log("Aborted xhr request.");
                                return;
                            }
                            if (!tryFailConnect(error)) {
                                // Increment our reconnect errors, we assume all errors to be reconnect errors
                                // In the case that it's our first error this will cause Reconnect to be fired
                                // after 1 second due to reconnectErrors being = 1.
                                reconnectErrors++;
                                if (connection.state !== signalR.connectionState.reconnecting) {
                                    connection.log("An error occurred using longPolling. Status = " + textStatus + ".  Response = " + data.responseText + ".");
                                    $(instance).triggerHandler(events.onError, [error]);
                                }
                                // We check the state here to verify that we're not in an invalid state prior to verifying Reconnect.
                                // If we're not in connected or reconnecting then the next ensureReconnectingState check will fail and will return.
                                // Therefore we don't want to change that failure code path.
                                if ((connection.state === signalR.connectionState.connected ||
                                    connection.state === signalR.connectionState.reconnecting) &&
                                    !transportLogic.verifyLastActive(connection)) {
                                    return;
                                }
                                // Transition into the reconnecting state
                                // If this fails then that means that the user transitioned the connection into the disconnected or connecting state within the above error handler trigger.
                                if (!transportLogic.ensureReconnectingState(instance)) {
                                    return;
                                }
                                // Call poll with the raiseReconnect flag as true after the reconnect delay
                                privateData.pollTimeoutId = window.setTimeout(function () {
                                    poll(instance, true);
                                }, that.reconnectDelay);
                            }
                        }
                    });
                    // This will only ever pass after an error has occurred via the poll ajax procedure.
                    if (reconnecting && raiseReconnect === true) {
                        // We wait to reconnect depending on how many times we've failed to reconnect.
                        // This is essentially a heuristic that will exponentially increase in wait time before
                        // triggering reconnected.  This depends on the "error" handler of Poll to cancel this
                        // timeout if it triggers before the Reconnected event fires.
                        // The Math.min at the end is to ensure that the reconnect timeout does not overflow.
                        privateData.reconnectTimeoutId = window.setTimeout(function () { fireReconnected(instance); }, Math.min(1000 * (Math.pow(2, reconnectErrors) - 1), maxFireReconnectedTimeout));
                    }
                }(connection));
            }, 250); // Have to delay initial poll so Chrome doesn't show loader spinner in tab
        },
        lostConnection: function (connection) {
            if (connection.pollXhr) {
                connection.pollXhr.abort("lostConnection");
            }
        },
        send: function (connection, data) {
            transportLogic.ajaxSend(connection, data);
        },
        stop: function (connection) {
            /// <summary>Stops the long polling connection</summary>
            /// <param name="connection" type="signalR">The SignalR connection to stop</param>
            window.clearTimeout(connection._.pollTimeoutId);
            window.clearTimeout(connection._.reconnectTimeoutId);
            delete connection._.pollTimeoutId;
            delete connection._.reconnectTimeoutId;
            if (connection.pollXhr) {
                connection.pollXhr.abort();
                connection.pollXhr = null;
                delete connection.pollXhr;
            }
        },
        abort: function (connection, async) {
            transportLogic.ajaxAbort(connection, async);
        }
    };
}(window.jQuery, window));
/* jquery.signalR.hubs.js */
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*global window:false */
/// <reference path="jquery.signalR.core.js" />
(function ($, window, undefined) {
    var eventNamespace = ".hubProxy",
        signalR = $.signalR;
    function makeEventName(event) {
        return event + eventNamespace;
    }
    // Equivalent to Array.prototype.map
    function map(arr, fun, thisp) {
        var i,
            length = arr.length,
            result = [];
        for (i = 0; i < length; i += 1) {
            if (arr.hasOwnProperty(i)) {
                result[i] = fun.call(thisp, arr[i], i, arr);
            }
        }
        return result;
    }
    function getArgValue(a) {
        return $.isFunction(a) ? null : ($.type(a) === "undefined" ? null : a);
    }
    function hasMembers(obj) {
        for (var key in obj) {
            // If we have any properties in our callback map then we have callbacks and can exit the loop via return
            if (obj.hasOwnProperty(key)) {
                return true;
            }
        }
        return false;
    }
    function clearInvocationCallbacks(connection, error) {
        /// <param name="connection" type="hubConnection" />
        var callbacks = connection._.invocationCallbacks,
            callback;
        if (hasMembers(callbacks)) {
            connection.log("Clearing hub invocation callbacks with error: " + error + ".");
        }
        // Reset the callback cache now as we have a local var referencing it
        connection._.invocationCallbackId = 0;
        delete connection._.invocationCallbacks;
        connection._.invocationCallbacks = {};
        // Loop over the callbacks and invoke them.
        // We do this using a local var reference and *after* we've cleared the cache
        // so that if a fail callback itself tries to invoke another method we don't
        // end up with its callback in the list we're looping over.
        for (var callbackId in callbacks) {
            callback = callbacks[callbackId];
            callback.method.call(callback.scope, { E: error });
        }
    }
    // hubProxy
    function hubProxy(hubConnection, hubName) {
        /// <summary>
        ///     Creates a new proxy object for the given hub connection that can be used to invoke
        ///     methods on server hubs and handle client method invocation requests from the server.
        /// </summary>
        return new hubProxy.fn.init(hubConnection, hubName);
    }
    hubProxy.fn = hubProxy.prototype = {
        init: function (connection, hubName) {
            this.state = {};
            this.connection = connection;
            this.hubName = hubName;
            this._ = {
                callbackMap: {}
            };
        },
        constructor: hubProxy,
        hasSubscriptions: function () {
            return hasMembers(this._.callbackMap);
        },
        on: function (eventName, callback) {
            /// <summary>Wires up a callback to be invoked when a invocation request is received from the server hub.</summary>
            /// <param name="eventName" type="String">The name of the hub event to register the callback for.</param>
            /// <param name="callback" type="Function">The callback to be invoked.</param>
            var that = this,
                callbackMap = that._.callbackMap;
            // Normalize the event name to lowercase
            eventName = eventName.toLowerCase();
            // If there is not an event registered for this callback yet we want to create its event space in the callback map.
            if (!callbackMap[eventName]) {
                callbackMap[eventName] = {};
            }
            // Map the callback to our encompassed function
            callbackMap[eventName][callback] = function (e, data) {
                callback.apply(that, data);
            };
            $(that).bind(makeEventName(eventName), callbackMap[eventName][callback]);
            return that;
        },
        off: function (eventName, callback) {
            /// <summary>Removes the callback invocation request from the server hub for the given event name.</summary>
            /// <param name="eventName" type="String">The name of the hub event to unregister the callback for.</param>
            /// <param name="callback" type="Function">The callback to be invoked.</param>
            var that = this,
                callbackMap = that._.callbackMap,
                callbackSpace;
            // Normalize the event name to lowercase
            eventName = eventName.toLowerCase();
            callbackSpace = callbackMap[eventName];
            // Verify that there is an event space to unbind
            if (callbackSpace) {
                // Only unbind if there's an event bound with eventName and a callback with the specified callback
                if (callbackSpace[callback]) {
                    $(that).unbind(makeEventName(eventName), callbackSpace[callback]);
                    // Remove the callback from the callback map
                    delete callbackSpace[callback];
                    // Check if there are any members left on the event, if not we need to destroy it.
                    if (!hasMembers(callbackSpace)) {
                        delete callbackMap[eventName];
                    }
                } else if (!callback) { // Check if we're removing the whole event and we didn't error because of an invalid callback
                    $(that).unbind(makeEventName(eventName));
                    delete callbackMap[eventName];
                }
            }
            return that;
        },
        invoke: function (methodName) {
            /// <summary>Invokes a server hub method with the given arguments.</summary>
            /// <param name="methodName" type="String">The name of the server hub method.</param>
            var that = this,
                connection = that.connection,
                args = $.makeArray(arguments).slice(1),
                argValues = map(args, getArgValue),
                data = { H: that.hubName, M: methodName, A: argValues, I: connection._.invocationCallbackId },
                d = $.Deferred(),
                callback = function (minResult) {
                    var result = that._maximizeHubResponse(minResult),
                        source,
                        error;
                    // Update the hub state
                    $.extend(that.state, result.State);
                    if (result.Progress) {
                        if (d.notifyWith) {
                            // Progress is only supported in jQuery 1.7+
                            d.notifyWith(that, [result.Progress.Data]);
                        } else if(!connection._.progressjQueryVersionLogged) {
                            connection.log("A hub method invocation progress update was received but the version of jQuery in use (" + $.prototype.jquery + ") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications.");
                            connection._.progressjQueryVersionLogged = true;
                        }
                    } else if (result.Error) {
                        // Server hub method threw an exception, log it & reject the deferred
                        if (result.StackTrace) {
                            connection.log(result.Error + "\n" + result.StackTrace + ".");
                        }
                        // result.ErrorData is only set if a HubException was thrown
                        source = result.IsHubException ? "HubException" : "Exception";
                        error = signalR._.error(result.Error, source);
                        error.data = result.ErrorData;
                        connection.log(that.hubName + "." + methodName + " failed to execute. Error: " + error.message);
                        d.rejectWith(that, [error]);
                    } else {
                        // Server invocation succeeded, resolve the deferred
                        connection.log("Invoked " + that.hubName + "." + methodName);
                        d.resolveWith(that, [result.Result]);
                    }
                };
            connection._.invocationCallbacks[connection._.invocationCallbackId.toString()] = { scope: that, method: callback };
            connection._.invocationCallbackId += 1;
            if (!$.isEmptyObject(that.state)) {
                data.S = that.state;
            }
            connection.log("Invoking " + that.hubName + "." + methodName);
            connection.send(data);
            return d.promise();
        },
        _maximizeHubResponse: function (minHubResponse) {
            return {
                State: minHubResponse.S,
                Result: minHubResponse.R,
                Progress: minHubResponse.P ? {
                    Id: minHubResponse.P.I,
                    Data: minHubResponse.P.D
                } : null,
                Id: minHubResponse.I,
                IsHubException: minHubResponse.H,
                Error: minHubResponse.E,
                StackTrace: minHubResponse.T,
                ErrorData: minHubResponse.D
            };
        }
    };
    hubProxy.fn.init.prototype = hubProxy.fn;
    // hubConnection
    function hubConnection(url, options) {
        /// <summary>Creates a new hub connection.</summary>
        /// <param name="url" type="String">[Optional] The hub route url, defaults to "/signalr".</param>
        /// <param name="options" type="Object">[Optional] Settings to use when creating the hubConnection.</param>
        var settings = {
            qs: null,
            logging: false,
            useDefaultPath: true
        };
        $.extend(settings, options);
        if (!url || settings.useDefaultPath) {
            url = (url || "") + "/signalr";
        }
        return new hubConnection.fn.init(url, settings);
    }
    hubConnection.fn = hubConnection.prototype = $.connection();
    hubConnection.fn.init = function (url, options) {
        var settings = {
                qs: null,
                logging: false,
                useDefaultPath: true
            },
            connection = this;
        $.extend(settings, options);
        // Call the base constructor
        $.signalR.fn.init.call(connection, url, settings.qs, settings.logging);
        // Object to store hub proxies for this connection
        connection.proxies = {};
        connection._.invocationCallbackId = 0;
        connection._.invocationCallbacks = {};
        // Wire up the received handler
        connection.received(function (minData) {
            var data, proxy, dataCallbackId, callback, hubName, eventName;
            if (!minData) {
                return;
            }
            // We have to handle progress updates first in order to ensure old clients that receive
            // progress updates enter the return value branch and then no-op when they can't find
            // the callback in the map (because the minData.I value will not be a valid callback ID)
            if (typeof (minData.P) !== "undefined") {
                // Process progress notification
                dataCallbackId = minData.P.I.toString();
                callback = connection._.invocationCallbacks[dataCallbackId];
                if (callback) {
                    callback.method.call(callback.scope, minData);
                }
            } else if (typeof (minData.I) !== "undefined") {
                // We received the return value from a server method invocation, look up callback by id and call it
                dataCallbackId = minData.I.toString();
                callback = connection._.invocationCallbacks[dataCallbackId];
                if (callback) {
                    // Delete the callback from the proxy
                    connection._.invocationCallbacks[dataCallbackId] = null;
                    delete connection._.invocationCallbacks[dataCallbackId];
                    // Invoke the callback
                    callback.method.call(callback.scope, minData);
                }
            } else {
                data = this._maximizeClientHubInvocation(minData);
                // We received a client invocation request, i.e. broadcast from server hub
                connection.log("Triggering client hub event '" + data.Method + "' on hub '" + data.Hub + "'.");
                // Normalize the names to lowercase
                hubName = data.Hub.toLowerCase();
                eventName = data.Method.toLowerCase();
                // Trigger the local invocation event
                proxy = this.proxies[hubName];
                // Update the hub state
                $.extend(proxy.state, data.State);
                $(proxy).triggerHandler(makeEventName(eventName), [data.Args]);
            }
        });
        connection.error(function (errData, origData) {
            var callbackId, callback;
            if (!origData) {
                // No original data passed so this is not a send error
                return;
            }
            callbackId = origData.I;
            callback = connection._.invocationCallbacks[callbackId];
            // Verify that there is a callback bound (could have been cleared)
            if (callback) {
                // Delete the callback
                connection._.invocationCallbacks[callbackId] = null;
                delete connection._.invocationCallbacks[callbackId];
                // Invoke the callback with an error to reject the promise
                callback.method.call(callback.scope, { E: errData });
            }
        });
        connection.reconnecting(function () {
            if (connection.transport && connection.transport.name === "webSockets") {
                clearInvocationCallbacks(connection, "Connection started reconnecting before invocation result was received.");
            }
        });
        connection.disconnected(function () {
            clearInvocationCallbacks(connection, "Connection was disconnected before invocation result was received.");
        });
    };
    hubConnection.fn._maximizeClientHubInvocation = function (minClientHubInvocation) {
        return {
            Hub: minClientHubInvocation.H,
            Method: minClientHubInvocation.M,
            Args: minClientHubInvocation.A,
            State: minClientHubInvocation.S
        };
    };
    hubConnection.fn._registerSubscribedHubs = function () {
        /// <summary>
        ///     Sets the starting event to loop through the known hubs and register any new hubs
        ///     that have been added to the proxy.
        /// </summary>
        var connection = this;
        if (!connection._subscribedToHubs) {
            connection._subscribedToHubs = true;
            connection.starting(function () {
                // Set the connection's data object with all the hub proxies with active subscriptions.
                // These proxies will receive notifications from the server.
                var subscribedHubs = [];
                $.each(connection.proxies, function (key) {
                    if (this.hasSubscriptions()) {
                        subscribedHubs.push({ name: key });
                        connection.log("Client subscribed to hub '" + key + "'.");
                    }
                });
                if (subscribedHubs.length === 0) {
                    connection.log("No hubs have been subscribed to.  The client will not receive data from hubs.  To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to.");
                }
                connection.data = connection.json.stringify(subscribedHubs);
            });
        }
    };
    hubConnection.fn.createHubProxy = function (hubName) {
        /// <summary>
        ///     Creates a new proxy object for the given hub connection that can be used to invoke
        ///     methods on server hubs and handle client method invocation requests from the server.
        /// </summary>
        /// <param name="hubName" type="String">
        ///     The name of the hub on the server to create the proxy for.
        /// </param>
        // Normalize the name to lowercase
        hubName = hubName.toLowerCase();
        var proxy = this.proxies[hubName];
        if (!proxy) {
            proxy = hubProxy(this, hubName);
            this.proxies[hubName] = proxy;
        }
        this._registerSubscribedHubs();
        return proxy;
    };
    hubConnection.fn.init.prototype = hubConnection.fn;
    $.hubConnection = hubConnection;
}(window.jQuery, window));
/* jquery.signalR.version.js */
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*global window:false */
/// <reference path="jquery.signalR.core.js" />
(function ($, undefined) {
    $.signalR.version = "2.2.2";
}(window.jQuery));
WebAPI/Scripts/jquery.signalR-2.2.2.min.js
New file
@@ -0,0 +1,9 @@
/*!
 * ASP.NET SignalR JavaScript Library v2.2.2
 * http://signalr.net/
 *
 * Copyright (c) .NET Foundation. All rights reserved.
 * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 *
 */
(function(n,t,i){function w(t,i){var u,f;if(n.isArray(t)){for(u=t.length-1;u>=0;u--)f=t[u],n.type(f)==="string"&&r.transports[f]||(i.log("Invalid transport: "+f+", removing it from the transports list."),t.splice(u,1));t.length===0&&(i.log("No transports remain within the specified transport array."),t=null)}else if(r.transports[t]||t==="auto"){if(t==="auto"&&r._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+t.toString()+"."),t=null;return t}function b(n){return n==="http:"?80:n==="https:"?443:void 0}function a(n,t){return t.match(/:\d+$/)?t:t+":"+b(n)}function k(t,i){var u=this,r=[];u.tryBuffer=function(i){return t.state===n.signalR.connectionState.connecting?(r.push(i),!0):!1};u.drain=function(){if(t.state===n.signalR.connectionState.connected)while(r.length>0)i(r.shift())};u.clear=function(){r=[]}}var f={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",errorDuringStartRequest:"Error during start request. Stopping the connection.",stoppedDuringStartRequest:"The connection was stopped during the start request.",errorParsingStartResponse:"Error parsing start response: '{0}'. Stopping the connection.",invalidStartResponse:"Invalid start response: '{0}'. Stopping the connection.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server.  Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting.",reconnectTimeout:"Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",reconnectWindowTimeout:"The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."};if(typeof n!="function")throw new Error(f.nojQuery);var r,h,o=t.document.readyState==="complete",e=n(t),c="__Negotiate Aborted__",u={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},v=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},s=function(t,i,r){return i===t.state?(t.state=r,n(t).triggerHandler(u.onStateChanged,[{oldState:i,newState:r}]),!0):!1},y=function(n){return n.state===r.connectionState.disconnected},l=function(n){return n._.keepAliveData.activated&&n.transport.supportsKeepAlive(n)},p=function(i){var f,e;i._.configuredStopReconnectingTimeout||(e=function(t){var i=r._.format(r.resources.reconnectTimeout,t.disconnectTimeout);t.log(i);n(t).triggerHandler(u.onError,[r._.error(i,"TimeoutException")]);t.stop(!1,!1)},i.reconnecting(function(){var n=this;n.state===r.connectionState.reconnecting&&(f=t.setTimeout(function(){e(n)},n.disconnectTimeout))}),i.stateChanged(function(n){n.oldState===r.connectionState.reconnecting&&t.clearTimeout(f)}),i._.configuredStopReconnectingTimeout=!0)};if(r=function(n,t,i){return new r.fn.init(n,t,i)},r._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var i,n;return t.navigator.appName==="Microsoft Internet Explorer"&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(i=t.parseFloat(n[1]))),i}(),error:function(n,t,i){var r=new Error(n);return r.source=t,typeof i!="undefined"&&(r.context=i),r},transportError:function(n,t,r,u){var f=this.error(n,r,u);return f.transport=t?t.name:i,f},format:function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace("{"+n+"}",arguments[n+1]);return t},firefoxMajorVersion:function(n){var t=n.match(/Firefox\/(\d+)/);return!t||!t.length||t.length<2?0:parseInt(t[1],10)},configurePingInterval:function(i){var f=i._.config,e=function(t){n(i).triggerHandler(u.onError,[t])};f&&!i._.pingIntervalId&&f.pingInterval&&(i._.pingIntervalId=t.setInterval(function(){r.transports._logic.pingServer(i).fail(e)},f.pingInterval))}},r.events=u,r.resources=f,r.ajaxDefaults={processData:!0,timeout:null,async:!0,global:!1,cache:!1},r.changeState=s,r.isDisconnecting=y,r.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4},r.hub={start:function(){throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'><\/script>.");}},typeof e.on=="function")e.on("load",function(){o=!0});else e.load(function(){o=!0});r.fn=r.prototype={init:function(t,i,r){var f=n(this);this.url=t;this.qs=i;this.lastError=null;this._={keepAliveData:{},connectingMessageBuffer:new k(this,function(n){f.triggerHandler(u.onReceived,[n])}),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0};typeof r=="boolean"&&(this.logging=r)},_parseResponse:function(n){var t=this;return n?typeof n=="string"?t.json.parse(n):n:n},_originalJson:t.JSON,json:t.JSON,isCrossDomain:function(i,r){var u;return(i=n.trim(i),r=r||t.location,i.indexOf("http")!==0)?!1:(u=t.document.createElement("a"),u.href=i,u.protocol+a(u.protocol,u.host)!==r.protocol+a(r.protocol,r.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:r.connectionState.disconnected,clientProtocol:"1.5",reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(i,h){var a=this,v={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},d,y=a._deferral||n.Deferred(),b=t.document.createElement("a"),k,g;if(a.lastError=null,a._deferral=y,!a.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if(n.type(i)==="function"?h=i:n.type(i)==="object"&&(n.extend(v,i),n.type(v.callback)==="function"&&(h=v.callback)),v.transport=w(v.transport,a),!v.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");return(a._.config=v,!o&&v.waitForPageLoad===!0)?(a._.deferredStartHandler=function(){a.start(i,h)},e.bind("load",a._.deferredStartHandler),y.promise()):a.state===r.connectionState.connecting?y.promise():s(a,r.connectionState.disconnected,r.connectionState.connecting)===!1?(y.resolve(a),y.promise()):(p(a),b.href=a.url,b.protocol&&b.protocol!==":"?(a.protocol=b.protocol,a.host=b.host):(a.protocol=t.document.location.protocol,a.host=b.host||t.document.location.host),a.baseUrl=a.protocol+"//"+a.host,a.wsProtocol=a.protocol==="https:"?"wss://":"ws://",v.transport==="auto"&&v.jsonp===!0&&(v.transport="longPolling"),a.url.indexOf("//")===0&&(a.url=t.location.protocol+a.url,a.log("Protocol relative URL detected, normalizing it to '"+a.url+"'.")),this.isCrossDomain(a.url)&&(a.log("Auto detected cross domain url."),v.transport==="auto"&&(v.transport=["webSockets","serverSentEvents","longPolling"]),typeof v.withCredentials=="undefined"&&(v.withCredentials=!0),v.jsonp||(v.jsonp=!n.support.cors,v.jsonp&&a.log("Using jsonp because this browser doesn't support CORS.")),a.contentType=r._.defaultContentType),a.withCredentials=v.withCredentials,a.ajaxDataType=v.jsonp?"jsonp":"text",n(a).bind(u.onStart,function(){n.type(h)==="function"&&h.call(a);y.resolve(a)}),a._.initHandler=r.transports._logic.initHandler(a),d=function(i,o){var c=r._.error(f.noTransportOnInit);if(o=o||0,o>=i.length){o===0?a.log("No transports supported by the server were selected."):o===1?a.log("No fallback transports were selected."):a.log("Fallback transports exhausted.");n(a).triggerHandler(u.onError,[c]);y.reject(c);a.stop();return}if(a.state!==r.connectionState.disconnected){var p=i[o],h=r.transports[p],v=function(){d(i,o+1)};a.transport=h;try{a._.initHandler.start(h,function(){var i=r._.firefoxMajorVersion(t.navigator.userAgent)>=11,f=!!a.withCredentials&&i;a.log("The start request succeeded. Transitioning to the connected state.");l(a)&&r.transports._logic.monitorKeepAlive(a);r.transports._logic.startHeartbeat(a);r._.configurePingInterval(a);s(a,r.connectionState.connecting,r.connectionState.connected)||a.log("WARNING! The connection was not in the connecting state.");a._.connectingMessageBuffer.drain();n(a).triggerHandler(u.onStart);e.bind("unload",function(){a.log("Window unloading, stopping the connection.");a.stop(f)});i&&e.bind("beforeunload",function(){t.setTimeout(function(){a.stop(f)},0)})},v)}catch(w){a.log(h.name+" transport threw '"+w.message+"' when attempting to start.");v()}}},k=a.url+"/negotiate",g=function(t,i){var e=r._.error(f.errorOnNegotiate,t,i._.negotiateRequest);n(i).triggerHandler(u.onError,e);y.reject(e);i.stop()},n(a).triggerHandler(u.onStarting),k=r.transports._logic.prepareQueryString(a,k),a.log("Negotiating with '"+k+"'."),a._.negotiateRequest=r.transports._logic.ajax(a,{url:k,error:function(n,t){t!==c?g(n,a):y.reject(r._.error(f.stoppedWhileNegotiating,null,a._.negotiateRequest))},success:function(t){var i,e,h,o=[],s=[];try{i=a._parseResponse(t)}catch(c){g(r._.error(f.errorParsingNegotiateResponse,c),a);return}if(e=a._.keepAliveData,a.appRelativeUrl=i.Url,a.id=i.ConnectionId,a.token=i.ConnectionToken,a.webSocketServerUrl=i.WebSocketServerUrl,a._.pollTimeout=i.ConnectionTimeout*1e3+1e4,a.disconnectTimeout=i.DisconnectTimeout*1e3,a._.totalTransportConnectTimeout=a.transportConnectTimeout+i.TransportConnectTimeout*1e3,i.KeepAliveTimeout?(e.activated=!0,e.timeout=i.KeepAliveTimeout*1e3,e.timeoutWarning=e.timeout*a.keepAliveWarnAt,a._.beatInterval=(e.timeout-e.timeoutWarning)/3):e.activated=!1,a.reconnectWindow=a.disconnectTimeout+(e.timeout||0),!i.ProtocolVersion||i.ProtocolVersion!==a.clientProtocol){h=r._.error(r._.format(f.protocolIncompatible,a.clientProtocol,i.ProtocolVersion));n(a).triggerHandler(u.onError,[h]);y.reject(h);return}n.each(r.transports,function(n){if(n.indexOf("_")===0||n==="webSockets"&&!i.TryWebSockets)return!0;s.push(n)});n.isArray(v.transport)?n.each(v.transport,function(t,i){n.inArray(i,s)>=0&&o.push(i)}):v.transport==="auto"?o=s:n.inArray(v.transport,s)>=0&&o.push(v.transport);d(o)}}),y.promise())},starting:function(t){var i=this;return n(i).bind(u.onStarting,function(){t.call(i)}),i},send:function(n){var t=this;if(t.state===r.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(t.state===r.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return t.transport.send(t,n),t},received:function(t){var i=this;return n(i).bind(u.onReceived,function(n,r){t.call(i,r)}),i},stateChanged:function(t){var i=this;return n(i).bind(u.onStateChanged,function(n,r){t.call(i,r)}),i},error:function(t){var i=this;return n(i).bind(u.onError,function(n,r,u){i.lastError=r;t.call(i,r,u)}),i},disconnected:function(t){var i=this;return n(i).bind(u.onDisconnect,function(){t.call(i)}),i},connectionSlow:function(t){var i=this;return n(i).bind(u.onConnectionSlow,function(){t.call(i)}),i},reconnecting:function(t){var i=this;return n(i).bind(u.onReconnecting,function(){t.call(i)}),i},reconnected:function(t){var i=this;return n(i).bind(u.onReconnect,function(){t.call(i)}),i},stop:function(i,h){var a=this,v=a._deferral;if(a._.deferredStartHandler&&e.unbind("load",a._.deferredStartHandler),delete a._.config,delete a._.deferredStartHandler,!o&&(!a._.config||a._.config.waitForPageLoad===!0)){a.log("Stopping connection prior to negotiate.");v&&v.reject(r._.error(f.stoppedWhileLoading));return}if(a.state!==r.connectionState.disconnected)return a.log("Stopping connection."),t.clearTimeout(a._.beatHandle),t.clearInterval(a._.pingIntervalId),a.transport&&(a.transport.stop(a),h!==!1&&a.transport.abort(a,i),l(a)&&r.transports._logic.stopMonitoringKeepAlive(a),a.transport=null),a._.negotiateRequest&&(a._.negotiateRequest.abort(c),delete a._.negotiateRequest),a._.initHandler&&a._.initHandler.stop(),delete a._deferral,delete a.messageId,delete a.groupsToken,delete a.id,delete a._.pingIntervalId,delete a._.lastMessageAt,delete a._.lastActiveAt,a._.connectingMessageBuffer.clear(),n(a).unbind(u.onStart),s(a,a.state,r.connectionState.disconnected),n(a).triggerHandler(u.onDisconnect),a},log:function(n){v(n,this.logging)}};r.fn.init.prototype=r.fn;r.noConflict=function(){return n.connection===r&&(n.connection=h),r};n.connection&&(h=n.connection);n.connection=n.signalR=r})(window.jQuery,window),function(n,t,i){function s(n){n._.keepAliveData.monitoring&&l(n);u.markActive(n)&&(n._.beatHandle=t.setTimeout(function(){s(n)},n._.beatInterval))}function l(t){var i=t._.keepAliveData,u;t.state===r.connectionState.connected&&(u=(new Date).getTime()-t._.lastMessageAt,u>=i.timeout?(t.log("Keep alive timed out.  Notifying transport that connection has been lost."),t.transport.lostConnection(t)):u>=i.timeoutWarning?i.userNotified||(t.log("Keep alive has been missed, connection may be dead/slow."),n(t).triggerHandler(f.onConnectionSlow),i.userNotified=!0):i.userNotified=!1)}function e(n,t){var i=n.url+t;return n.transport&&(i+="?transport="+n.transport.name),u.prepareQueryString(n,i)}function h(n){this.connection=n;this.startRequested=!1;this.startCompleted=!1;this.connectionStopped=!1}var r=n.signalR,f=n.signalR.events,c=n.signalR.changeState,o="__Start Aborted__",u;r.transports={};h.prototype={start:function(n,r,u){var f=this,e=f.connection,o=!1;if(f.startRequested||f.connectionStopped){e.log("WARNING! "+n.name+" transport cannot be started. Initialization ongoing or completed.");return}e.log(n.name+" transport starting.");n.start(e,function(){o||f.initReceived(n,r)},function(t){return o||(o=!0,f.transportFailed(n,t,u)),!f.startCompleted||f.connectionStopped});f.transportTimeoutHandle=t.setTimeout(function(){o||(o=!0,e.log(n.name+" transport timed out when trying to connect."),f.transportFailed(n,i,u))},e._.totalTransportConnectTimeout)},stop:function(){this.connectionStopped=!0;t.clearTimeout(this.transportTimeoutHandle);r.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(n,i){var u=this,f=u.connection;if(u.startRequested){f.log("WARNING! The client received multiple init messages.");return}u.connectionStopped||(u.startRequested=!0,t.clearTimeout(u.transportTimeoutHandle),f.log(n.name+" transport connected. Initiating start request."),r.transports._logic.ajaxStart(f,function(){u.startCompleted=!0;i()}))},transportFailed:function(i,u,e){var o=this.connection,h=o._deferral,s;this.connectionStopped||(t.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(s=r._.error(r.resources.errorDuringStartRequest,u),o.log(i.name+" transport failed during the start request. Stopping the connection."),n(o).triggerHandler(f.onError,[s]),h&&h.reject(s),o.stop()):(i.stop(o),o.log(i.name+" transport failed to connect. Attempting to fall back."),e()))}};u=r.transports._logic={ajax:function(t,i){return n.ajax(n.extend(!0,{},n.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:t.withCredentials},contentType:t.contentType,dataType:t.ajaxDataType},i))},pingServer:function(t){var e,f,i=n.Deferred();return t.transport?(e=t.url+"/ping",e=u.addQs(e,t.qs),f=u.ajax(t,{url:e,success:function(n){var u;try{u=t._parseResponse(n)}catch(e){i.reject(r._.transportError(r.resources.pingServerFailedParse,t.transport,e,f));t.stop();return}u.Response==="pong"?i.resolve():i.reject(r._.transportError(r._.format(r.resources.pingServerFailedInvalidResponse,n),t.transport,null,f))},error:function(n){n.status===401||n.status===403?(i.reject(r._.transportError(r._.format(r.resources.pingServerFailedStatusCode,n.status),t.transport,n,f)),t.stop()):i.reject(r._.transportError(r.resources.pingServerFailed,t.transport,n,f))}})):i.reject(r._.transportError(r.resources.noConnectionTransport,t.transport)),i.promise()},prepareQueryString:function(n,i){var r;return r=u.addQs(i,"clientProtocol="+n.clientProtocol),r=u.addQs(r,n.qs),n.token&&(r+="&connectionToken="+t.encodeURIComponent(n.token)),n.data&&(r+="&connectionData="+t.encodeURIComponent(n.data)),r},addQs:function(t,i){var r=t.indexOf("?")!==-1?"&":"?",u;if(!i)return t;if(typeof i=="object")return t+r+n.param(i);if(typeof i=="string")return u=i.charAt(0),(u==="?"||u==="&")&&(r=""),t+r+i;throw new Error("Query string property must be either a string or object.");},getUrl:function(n,i,r,f,e){var h=i==="webSockets"?"":n.baseUrl,o=h+n.appRelativeUrl,s="transport="+i;return!e&&n.groupsToken&&(s+="&groupsToken="+t.encodeURIComponent(n.groupsToken)),r?(o+=f?"/poll":"/reconnect",!e&&n.messageId&&(s+="&messageId="+t.encodeURIComponent(n.messageId))):o+="/connect",o+="?"+s,o=u.prepareQueryString(n,o),e||(o+="&tid="+Math.floor(Math.random()*11)),o},maximizePersistentResponse:function(n){return{MessageId:n.C,Messages:n.M,Initialized:typeof n.S!="undefined"?!0:!1,ShouldReconnect:typeof n.T!="undefined"?!0:!1,LongPollDelay:n.L,GroupsToken:n.G}},updateGroups:function(n,t){t&&(n.groupsToken=t)},stringifySend:function(n,t){return typeof t=="string"||typeof t=="undefined"||t===null?t:n.json.stringify(t)},ajaxSend:function(t,i){var h=u.stringifySend(t,i),c=e(t,"/send"),o,s=function(t,u){n(u).triggerHandler(f.onError,[r._.transportError(r.resources.sendFailed,u.transport,t,o),i])};return o=u.ajax(t,{url:c,type:t.ajaxDataType==="jsonp"?"GET":"POST",contentType:r._.defaultContentType,data:{data:h},success:function(n){var i;if(n){try{i=t._parseResponse(n)}catch(r){s(r,t);t.stop();return}u.triggerReceived(t,i)}},error:function(n,i){i!=="abort"&&i!=="parsererror"&&s(n,t)}})},ajaxAbort:function(n,t){if(typeof n.transport!="undefined"){t=typeof t=="undefined"?!0:t;var i=e(n,"/abort");u.ajax(n,{url:i,async:t,timeout:1e3,type:"POST"});n.log("Fired ajax abort async = "+t+".")}},ajaxStart:function(t,i){var h=function(n){var i=t._deferral;i&&i.reject(n)},s=function(i){t.log("The start request failed. Stopping the connection.");n(t).triggerHandler(f.onError,[i]);h(i);t.stop()};t._.startRequest=u.ajax(t,{url:e(t,"/start"),success:function(n,u,f){var e;try{e=t._parseResponse(n)}catch(o){s(r._.error(r._.format(r.resources.errorParsingStartResponse,n),o,f));return}e.Response==="started"?i():s(r._.error(r._.format(r.resources.invalidStartResponse,n),null,f))},error:function(n,i,u){i!==o?s(r._.error(r.resources.errorDuringStartRequest,u,n)):(t.log("The start request aborted because connection.stop() was called."),h(r._.error(r.resources.stoppedDuringStartRequest,null,n)))}})},tryAbortStartRequest:function(n){n._.startRequest&&(n._.startRequest.abort(o),delete n._.startRequest)},tryInitialize:function(n,t,i){t.Initialized&&i?i():t.Initialized&&n.log("WARNING! The client received an init message after reconnecting.")},triggerReceived:function(t,i){t._.connectingMessageBuffer.tryBuffer(i)||n(t).triggerHandler(f.onReceived,[i])},processMessages:function(t,i,r){var f;u.markLastMessage(t);i&&(f=u.maximizePersistentResponse(i),u.updateGroups(t,f.GroupsToken),f.MessageId&&(t.messageId=f.MessageId),f.Messages&&(n.each(f.Messages,function(n,i){u.triggerReceived(t,i)}),u.tryInitialize(t,f,r)))},monitorKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring?t.log("Tried to monitor keep alive but it's already being monitored."):(i.monitoring=!0,u.markLastMessage(t),t._.keepAliveData.reconnectKeepAliveUpdate=function(){u.markLastMessage(t)},n(t).bind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t.log("Now monitoring keep alive with a warning timeout of "+i.timeoutWarning+", keep alive timeout of "+i.timeout+" and disconnecting timeout of "+t.disconnectTimeout))},stopMonitoringKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring&&(i.monitoring=!1,n(t).unbind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t._.keepAliveData={},t.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(n){n._.lastActiveAt=(new Date).getTime();s(n)},markLastMessage:function(n){n._.lastMessageAt=(new Date).getTime()},markActive:function(n){return u.verifyLastActive(n)?(n._.lastActiveAt=(new Date).getTime(),!0):!1},isConnectedOrReconnecting:function(n){return n.state===r.connectionState.connected||n.state===r.connectionState.reconnecting},ensureReconnectingState:function(t){return c(t,r.connectionState.connected,r.connectionState.reconnecting)===!0&&n(t).triggerHandler(f.onReconnecting),t.state===r.connectionState.reconnecting},clearReconnectTimeout:function(n){n&&n._.reconnectTimeout&&(t.clearTimeout(n._.reconnectTimeout),delete n._.reconnectTimeout)},verifyLastActive:function(t){if((new Date).getTime()-t._.lastActiveAt>=t.reconnectWindow){var i=r._.format(r.resources.reconnectWindowTimeout,new Date(t._.lastActiveAt),t.reconnectWindow);return t.log(i),n(t).triggerHandler(f.onError,[r._.error(i,"TimeoutException")]),t.stop(!1,!1),!1}return!0},reconnect:function(n,i){var f=r.transports[i];if(u.isConnectedOrReconnecting(n)&&!n._.reconnectTimeout){if(!u.verifyLastActive(n))return;n._.reconnectTimeout=t.setTimeout(function(){u.verifyLastActive(n)&&(f.stop(n),u.ensureReconnectingState(n)&&(n.log(i+" reconnecting."),f.start(n)))},n.reconnectDelay)}},handleParseFailure:function(t,i,u,e,o){var s=r._.transportError(r._.format(r.resources.parseFailed,i),t.transport,u,o);e&&e(s)?t.log("Failed to parse server response while attempting to connect."):(n(t).triggerHandler(f.onError,[s]),t.stop())},initHandler:function(n){return new h(n)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,f=n.signalR.changeState,i=r.transports._logic;r.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(t,f){var e=i.stringifySend(t,f);try{t.socket.send(e)}catch(o){n(t).triggerHandler(u.onError,[r._.transportError(r.resources.webSocketsInvalidState,t.transport,o,t.socket),f])}},start:function(e,o,s){var h,c=!1,l=this,a=!o,v=n(e);if(!t.WebSocket){s();return}e.socket||(h=e.webSocketServerUrl?e.webSocketServerUrl:e.wsProtocol+e.host,h+=i.getUrl(e,this.name,a),e.log("Connecting to websocket endpoint '"+h+"'."),e.socket=new t.WebSocket(h),e.socket.onopen=function(){c=!0;e.log("Websocket opened.");i.clearReconnectTimeout(e);f(e,r.connectionState.reconnecting,r.connectionState.connected)===!0&&v.triggerHandler(u.onReconnect)},e.socket.onclose=function(t){var i;this===e.socket&&(c&&typeof t.wasClean!="undefined"&&t.wasClean===!1?(i=r._.transportError(r.resources.webSocketClosed,e.transport,t),e.log("Unclean disconnect from websocket: "+(t.reason||"[no reason given]."))):e.log("Websocket closed."),s&&s(i)||(i&&n(e).triggerHandler(u.onError,[i]),l.reconnect(e)))},e.socket.onmessage=function(t){var r;try{r=e._parseResponse(t.data)}catch(u){i.handleParseFailure(e,t.data,u,s,t);return}r&&(n.isEmptyObject(r)||r.M?i.processMessages(e,r,o):i.triggerReceived(e,r))})},reconnect:function(n){i.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},stop:function(n){i.clearReconnectTimeout(n);n.socket&&(n.log("Closing the Websocket."),n.socket.close(),n.socket=null)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var i=n.signalR,u=n.signalR.events,e=n.signalR.changeState,r=i.transports._logic,f=function(n){t.clearTimeout(n._.reconnectAttemptTimeoutHandle);delete n._.reconnectAttemptTimeoutHandle};i.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(o,s,h){var c=this,l=!1,a=n(o),v=!s,y;if(o.eventSource&&(o.log("The connection already has an event source. Stopping it."),o.stop()),!t.EventSource){h&&(o.log("This browser doesn't support SSE."),h());return}y=r.getUrl(o,this.name,v);try{o.log("Attempting to connect to SSE endpoint '"+y+"'.");o.eventSource=new t.EventSource(y,{withCredentials:o.withCredentials})}catch(p){o.log("EventSource failed trying to connect with error "+p.Message+".");h?h():(a.triggerHandler(u.onError,[i._.transportError(i.resources.eventSourceFailedToConnect,o.transport,p)]),v&&c.reconnect(o));return}v&&(o._.reconnectAttemptTimeoutHandle=t.setTimeout(function(){l===!1&&o.eventSource.readyState!==t.EventSource.OPEN&&c.reconnect(o)},c.timeOut));o.eventSource.addEventListener("open",function(){o.log("EventSource connected.");f(o);r.clearReconnectTimeout(o);l===!1&&(l=!0,e(o,i.connectionState.reconnecting,i.connectionState.connected)===!0&&a.triggerHandler(u.onReconnect))},!1);o.eventSource.addEventListener("message",function(n){var t;if(n.data!=="initialized"){try{t=o._parseResponse(n.data)}catch(i){r.handleParseFailure(o,n.data,i,h,n);return}r.processMessages(o,t,s)}},!1);o.eventSource.addEventListener("error",function(n){var r=i._.transportError(i.resources.eventSourceError,o.transport,n);this===o.eventSource&&(h&&h(r)||(o.log("EventSource readyState: "+o.eventSource.readyState+"."),n.eventPhase===t.EventSource.CLOSED?(o.log("EventSource reconnecting due to the server connection ending."),c.reconnect(o)):(o.log("EventSource error."),a.triggerHandler(u.onError,[r]))))},!1)},reconnect:function(n){r.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){r.ajaxSend(n,t)},stop:function(n){f(n);r.clearReconnectTimeout(n);n&&n.eventSource&&(n.log("EventSource calling close()."),n.eventSource.close(),n.eventSource=null,delete n.eventSource)},abort:function(n,t){r.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var r=n.signalR,e=n.signalR.events,o=n.signalR.changeState,i=r.transports._logic,u=function(){var n=t.document.createElement("iframe");return n.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),n},f=function(){var i=null,f=1e3,n=0;return{prevent:function(){r._.ieVersion<=8&&(n===0&&(i=t.setInterval(function(){var n=u();t.document.body.appendChild(n);t.document.body.removeChild(n);n=null},f)),n++)},cancel:function(){n===1&&t.clearInterval(i);n>0&&n--}}}();r.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(n,r,e){var l=this,s=i.foreverFrame.count+=1,h,o=u(),c=function(){n.log("Forever frame iframe finished loading and is no longer receiving messages.");e&&e()||l.reconnect(n)};if(t.EventSource){e&&(n.log("Forever Frame is not supported by SignalR on browsers with SSE support."),e());return}o.setAttribute("data-signalr-connection-id",n.id);f.prevent();h=i.getUrl(n,this.name);h+="&frameId="+s;t.document.documentElement.appendChild(o);n.log("Binding to iframe's load event.");o.addEventListener?o.addEventListener("load",c,!1):o.attachEvent&&o.attachEvent("onload",c);o.src=h;i.foreverFrame.connections[s]=n;n.frame=o;n.frameId=s;r&&(n.onSuccess=function(){n.log("Iframe transport started.");r()})},reconnect:function(n){var r=this;i.isConnectedOrReconnecting(n)&&i.verifyLastActive(n)&&t.setTimeout(function(){if(i.verifyLastActive(n)&&n.frame&&i.ensureReconnectingState(n)){var u=n.frame,t=i.getUrl(n,r.name,!0)+"&frameId="+n.frameId;n.log("Updating iframe src to '"+t+"'.");u.src=t}},n.reconnectDelay)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){i.ajaxSend(n,t)},receive:function(t,u){var f,e,o;if(t.json!==t._originalJson&&(u=t._originalJson.stringify(u)),o=t._parseResponse(u),i.processMessages(t,o,t.onSuccess),t.state===n.signalR.connectionState.connected&&(t.frameMessageCount=(t.frameMessageCount||0)+1,t.frameMessageCount>r.transports.foreverFrame.iframeClearThreshold&&(t.frameMessageCount=0,f=t.frame.contentWindow||t.frame.contentDocument,f&&f.document&&f.document.body)))for(e=f.document.body;e.firstChild;)e.removeChild(e.firstChild)},stop:function(n){var r=null;if(f.cancel(),n.frame){if(n.frame.stop)n.frame.stop();else try{r=n.frame.contentWindow||n.frame.contentDocument;r.document&&r.document.execCommand&&r.document.execCommand("Stop")}catch(u){n.log("Error occurred when stopping foreverFrame transport. Message = "+u.message+".")}n.frame.parentNode===t.document.documentElement&&t.document.documentElement.removeChild(n.frame);delete i.foreverFrame.connections[n.frameId];n.frame=null;n.frameId=null;delete n.frame;delete n.frameId;delete n.onSuccess;delete n.frameMessageCount;n.log("Stopping forever frame.")}},abort:function(n,t){i.ajaxAbort(n,t)},getConnection:function(n){return i.foreverFrame.connections[n]},started:function(t){o(t,r.connectionState.reconnecting,r.connectionState.connected)===!0&&n(t).triggerHandler(e.onReconnect)}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,e=n.signalR.changeState,f=n.signalR.isDisconnecting,i=r.transports._logic;r.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(o,s,h){var a=this,v=function(){v=n.noop;o.log("LongPolling connected.");s?s():o.log("WARNING! The client received an init message after reconnecting.")},y=function(n){return h(n)?(o.log("LongPolling failed to connect."),!0):!1},c=o._,l=0,p=function(i){t.clearTimeout(c.reconnectTimeoutId);c.reconnectTimeoutId=null;e(i,r.connectionState.reconnecting,r.connectionState.connected)===!0&&(i.log("Raising the reconnect event"),n(i).triggerHandler(u.onReconnect))},w=36e5;o.pollXhr&&(o.log("Polling xhr requests already exists, aborting."),o.stop());o.messageId=null;c.reconnectTimeoutId=null;c.pollTimeoutId=t.setTimeout(function(){(function e(s,h){var g=s.messageId,nt=g===null,k=!nt,tt=!h,d=i.getUrl(s,a.name,k,tt,!0),b={};(s.messageId&&(b.messageId=s.messageId),s.groupsToken&&(b.groupsToken=s.groupsToken),f(s)!==!0)&&(o.log("Opening long polling request to '"+d+"'."),s.pollXhr=i.ajax(o,{xhrFields:{onprogress:function(){i.markLastMessage(o)}},url:d,type:"POST",contentType:r._.defaultContentType,data:b,timeout:o._.pollTimeout,success:function(r){var h,w=0,u,a;o.log("Long poll complete.");l=0;try{h=o._parseResponse(r)}catch(b){i.handleParseFailure(s,r,b,y,s.pollXhr);return}(c.reconnectTimeoutId!==null&&p(s),h&&(u=i.maximizePersistentResponse(h)),i.processMessages(s,h,v),u&&n.type(u.LongPollDelay)==="number"&&(w=u.LongPollDelay),f(s)!==!0)&&(a=u&&u.ShouldReconnect,!a||i.ensureReconnectingState(s))&&(w>0?c.pollTimeoutId=t.setTimeout(function(){e(s,a)},w):e(s,a))},error:function(f,h){var v=r._.transportError(r.resources.longPollFailed,o.transport,f,s.pollXhr);if(t.clearTimeout(c.reconnectTimeoutId),c.reconnectTimeoutId=null,h==="abort"){o.log("Aborted xhr request.");return}if(!y(v)){if(l++,o.state!==r.connectionState.reconnecting&&(o.log("An error occurred using longPolling. Status = "+h+".  Response = "+f.responseText+"."),n(s).triggerHandler(u.onError,[v])),(o.state===r.connectionState.connected||o.state===r.connectionState.reconnecting)&&!i.verifyLastActive(o))return;if(!i.ensureReconnectingState(s))return;c.pollTimeoutId=t.setTimeout(function(){e(s,!0)},a.reconnectDelay)}}}),k&&h===!0&&(c.reconnectTimeoutId=t.setTimeout(function(){p(s)},Math.min(1e3*(Math.pow(2,l)-1),w))))})(o)},250)},lostConnection:function(n){n.pollXhr&&n.pollXhr.abort("lostConnection")},send:function(n,t){i.ajaxSend(n,t)},stop:function(n){t.clearTimeout(n._.pollTimeoutId);t.clearTimeout(n._.reconnectTimeoutId);delete n._.pollTimeoutId;delete n._.reconnectTimeoutId;n.pollXhr&&(n.pollXhr.abort(),n.pollXhr=null,delete n.pollXhr)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n){function r(n){return n+e}function s(n,t,i){for(var f=n.length,u=[],r=0;r<f;r+=1)n.hasOwnProperty(r)&&(u[r]=t.call(i,n[r],r,n));return u}function h(t){return n.isFunction(t)?null:n.type(t)==="undefined"?null:t}function u(n){for(var t in n)if(n.hasOwnProperty(t))return!0;return!1}function f(n,t){var i=n._.invocationCallbacks,r,f;u(i)&&n.log("Clearing hub invocation callbacks with error: "+t+".");n._.invocationCallbackId=0;delete n._.invocationCallbacks;n._.invocationCallbacks={};for(f in i)r=i[f],r.method.call(r.scope,{E:t})}function i(n,t){return new i.fn.init(n,t)}function t(i,r){var u={qs:null,logging:!1,useDefaultPath:!0};return n.extend(u,r),(!i||u.useDefaultPath)&&(i=(i||"")+"/signalr"),new t.fn.init(i,u)}var e=".hubProxy",o=n.signalR;i.fn=i.prototype={init:function(n,t){this.state={};this.connection=n;this.hubName=t;this._={callbackMap:{}}},constructor:i,hasSubscriptions:function(){return u(this._.callbackMap)},on:function(t,i){var u=this,f=u._.callbackMap;return t=t.toLowerCase(),f[t]||(f[t]={}),f[t][i]=function(n,t){i.apply(u,t)},n(u).bind(r(t),f[t][i]),u},off:function(t,i){var e=this,o=e._.callbackMap,f;return t=t.toLowerCase(),f=o[t],f&&(f[i]?(n(e).unbind(r(t),f[i]),delete f[i],u(f)||delete o[t]):i||(n(e).unbind(r(t)),delete o[t])),e},invoke:function(t){var i=this,r=i.connection,e=n.makeArray(arguments).slice(1),c=s(e,h),f={H:i.hubName,M:t,A:c,I:r._.invocationCallbackId},u=n.Deferred(),l=function(f){var e=i._maximizeHubResponse(f),h,s;n.extend(i.state,e.State);e.Progress?u.notifyWith?u.notifyWith(i,[e.Progress.Data]):r._.progressjQueryVersionLogged||(r.log("A hub method invocation progress update was received but the version of jQuery in use ("+n.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),r._.progressjQueryVersionLogged=!0):e.Error?(e.StackTrace&&r.log(e.Error+"\n"+e.StackTrace+"."),h=e.IsHubException?"HubException":"Exception",s=o._.error(e.Error,h),s.data=e.ErrorData,r.log(i.hubName+"."+t+" failed to execute. Error: "+s.message),u.rejectWith(i,[s])):(r.log("Invoked "+i.hubName+"."+t),u.resolveWith(i,[e.Result]))};return r._.invocationCallbacks[r._.invocationCallbackId.toString()]={scope:i,method:l},r._.invocationCallbackId+=1,n.isEmptyObject(i.state)||(f.S=i.state),r.log("Invoking "+i.hubName+"."+t),r.send(f),u.promise()},_maximizeHubResponse:function(n){return{State:n.S,Result:n.R,Progress:n.P?{Id:n.P.I,Data:n.P.D}:null,Id:n.I,IsHubException:n.H,Error:n.E,StackTrace:n.T,ErrorData:n.D}}};i.fn.init.prototype=i.fn;t.fn=t.prototype=n.connection();t.fn.init=function(t,i){var e={qs:null,logging:!1,useDefaultPath:!0},u=this;n.extend(e,i);n.signalR.fn.init.call(u,t,e.qs,e.logging);u.proxies={};u._.invocationCallbackId=0;u._.invocationCallbacks={};u.received(function(t){var f,o,e,i,s,h;t&&(typeof t.P!="undefined"?(e=t.P.I.toString(),i=u._.invocationCallbacks[e],i&&i.method.call(i.scope,t)):typeof t.I!="undefined"?(e=t.I.toString(),i=u._.invocationCallbacks[e],i&&(u._.invocationCallbacks[e]=null,delete u._.invocationCallbacks[e],i.method.call(i.scope,t))):(f=this._maximizeClientHubInvocation(t),u.log("Triggering client hub event '"+f.Method+"' on hub '"+f.Hub+"'."),s=f.Hub.toLowerCase(),h=f.Method.toLowerCase(),o=this.proxies[s],n.extend(o.state,f.State),n(o).triggerHandler(r(h),[f.Args])))});u.error(function(n,t){var i,r;t&&(i=t.I,r=u._.invocationCallbacks[i],r&&(u._.invocationCallbacks[i]=null,delete u._.invocationCallbacks[i],r.method.call(r.scope,{E:n})))});u.reconnecting(function(){u.transport&&u.transport.name==="webSockets"&&f(u,"Connection started reconnecting before invocation result was received.")});u.disconnected(function(){f(u,"Connection was disconnected before invocation result was received.")})};t.fn._maximizeClientHubInvocation=function(n){return{Hub:n.H,Method:n.M,Args:n.A,State:n.S}};t.fn._registerSubscribedHubs=function(){var t=this;t._subscribedToHubs||(t._subscribedToHubs=!0,t.starting(function(){var i=[];n.each(t.proxies,function(n){this.hasSubscriptions()&&(i.push({name:n}),t.log("Client subscribed to hub '"+n+"'."))});i.length===0&&t.log("No hubs have been subscribed to.  The client will not receive data from hubs.  To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to.");t.data=t.json.stringify(i)}))};t.fn.createHubProxy=function(n){n=n.toLowerCase();var t=this.proxies[n];return t||(t=i(this,n),this.proxies[n]=t),this._registerSubscribedHubs(),t};t.fn.init.prototype=t.fn;n.hubConnection=t}(window.jQuery,window),function(n){n.signalR.version="2.2.2"}(window.jQuery);
WebAPI/Web.config
@@ -46,6 +46,9 @@
        <add key="webpages:Enabled" value="false" />
        <add key="ClientValidationEnabled" value="true" />
        <add key="UnobtrusiveJavaScriptEnabled" value="true" />
        <add key="owin:AutomaticAppStartup" value="false" />
        <add key="owin:appStartup" value="" />
    </appSettings>
    <!--
    æœ‰å…³ web.config æ›´æ”¹çš„说明,请参见 http://go.microsoft.com/fwlink/?LinkId=235367。
@@ -92,6 +95,14 @@
                <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
    <system.webServer>
WebAPI/WebAPI.csproj
@@ -110,12 +110,27 @@
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Users\37327\Desktop\Kingdee.BOS.WebApi.Client.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.2.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.AspNet.SignalR.SystemWeb, Version=2.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.2.2\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Azure.AppService.ApiApps.Service, Version=0.9.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.Azure.AppService.ApiApps.Service.0.9.16\lib\net45\Microsoft.Azure.AppService.ApiApps.Service.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Microsoft.CSharp">
      <Private>True</Private>
    </Reference>
    <Reference Include="Microsoft.Owin, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Owin.Host.SystemWeb, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Owin.Security, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
@@ -135,6 +150,9 @@
    </Reference>
    <Reference Include="NPOI.OpenXmlFormats, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
      <HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll</HintPath>
    </Reference>
    <Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
      <HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
    </Reference>
    <Reference Include="RestSharp, Version=104.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\packages\RestSharp.104.0\lib\net4\RestSharp.dll</HintPath>
@@ -292,6 +310,8 @@
    <Content Include="Global.asax" />
    <Content Include="Index.html" />
    <Content Include="Properties\PublishProfiles\JFAPI.pubxml.user" />
    <Content Include="Scripts\jquery.signalR-2.2.2.js" />
    <Content Include="Scripts\jquery.signalR-2.2.2.min.js" />
    <Content Include="Views\Scripts\bootstrap.js" />
    <Content Include="Views\Scripts\bootstrap.min.js" />
    <Content Include="Config\kdapi.config" />
@@ -682,6 +702,8 @@
    <Compile Include="Controllers\基础资料\基础资料\Gy_ShelfLifeNearExpiryController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_CostItemController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_CostCenterController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_CostItemFixRateController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_CostItemAverageTypeController.cs" />
    <Compile Include="Controllers\检验申请单\QC_RequestCheckBillController.cs" />
    <Compile Include="Controllers\物流管理\其他结算单\YF_PayMentOtherBillTranController.cs" />
    <Compile Include="Controllers\物流管理\出运单\WLYayBillController.cs" />
WebAPI/packages.config
@@ -21,6 +21,13 @@
  <package id="Microsoft.AspNet.Cors" version="5.2.7" targetFramework="net45" />
  <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
  <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
  <package id="Microsoft.AspNet.SignalR" version="2.2.2" targetFramework="net45" />
  <package id="Microsoft.AspNet.SignalR.Core" version="2.2.2" targetFramework="net45" />
  <package id="Microsoft.AspNet.SignalR.Core.zh-Hans" version="2.2.2" targetFramework="net45" />
  <package id="Microsoft.AspNet.SignalR.JS" version="2.2.2" targetFramework="net45" />
  <package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.2.2" targetFramework="net45" />
  <package id="Microsoft.AspNet.SignalR.SystemWeb.zh-Hans" version="2.2.2" targetFramework="net45" />
  <package id="Microsoft.AspNet.SignalR.zh-Hans" version="2.2.2" targetFramework="net45" />
  <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net45" />
@@ -36,10 +43,17 @@
  <package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
  <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net45" />
  <package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
  <package id="Microsoft.Owin" version="4.0.1" targetFramework="net45" />
  <package id="Microsoft.Owin.Host.SystemWeb" version="4.0.1" targetFramework="net45" />
  <package id="Microsoft.Owin.Host.SystemWeb.zh-Hans" version="4.0.1" targetFramework="net45" />
  <package id="Microsoft.Owin.Security" version="4.0.1" targetFramework="net45" />
  <package id="Microsoft.Owin.Security.zh-Hans" version="4.0.1" targetFramework="net45" />
  <package id="Microsoft.Owin.zh-Hans" version="4.0.1" targetFramework="net45" />
  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
  <package id="Modernizr" version="2.6.2" targetFramework="net45" />
  <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net45" />
  <package id="NPOI" version="2.5.5" targetFramework="net45" />
  <package id="Owin" version="1.0" targetFramework="net45" />
  <package id="Portable.BouncyCastle" version="1.8.9" targetFramework="net45" />
  <package id="RestSharp" version="104.0" targetFramework="net45" />
  <package id="SharpZipLib" version="1.3.2" targetFramework="net45" />
WorkM/app.config
@@ -18,6 +18,14 @@
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>