/// <summary>
      /// 添加固定资产信息及计提信息
      /// </summary>
      /// <param name="FixInfoModel">固定资产实体</param>
      /// <param name="FixWithModel">固定资产计提实体</param>
      /// <returns>true 成功,false 失败</returns>
      public static bool InsertFixAssetInfo(FixAssetInfoModel FixInfoModel,FixWithInfoModel FixWithModel)
      {
          string []sqlArray=new string[2];
          //固定资产
          StringBuilder sql_FixInfo = new StringBuilder();
          FixWithModel.CompanyCD = FixInfoModel.CompanyCD;
          sql_FixInfo.AppendLine("Insert into officedba.FixAssetInfo");
          sql_FixInfo.AppendLine("(CompanyCD,FixNo,FixName,FixType,FixSpec,");
          sql_FixInfo.AppendLine("FixModel,FixNumber,Unit,OriginalValue,");
          sql_FixInfo.AppendLine("UseDept,StorePlace,RespPerson,RegisterDate,BegiDisCount,");
          sql_FixInfo.AppendLine("ReduValueRe,NetValue,UsedStatus,ModifiedDate,ModifiedUserID,Remark)");
          sql_FixInfo.AppendLine("values('" + FixInfoModel.CompanyCD + "','" + FixInfoModel.FixNo + "','" + FixInfoModel.FixName+ "','" + FixInfoModel.FixType + "',");
          sql_FixInfo.AppendLine("'" + FixInfoModel.FixSpec + "','" + FixInfoModel.FixModel + "','" + FixInfoModel.FixNumber + "', '" + FixInfoModel .Unit+ "',");
          sql_FixInfo.AppendLine(" '" + FixInfoModel.OriginalValue + "','" + FixInfoModel.UseDept + "','" + FixInfoModel.StorePlace + "','" +FixInfoModel. RespPerson + "', ");
          sql_FixInfo.AppendLine(" '" + FixInfoModel.RegisterDate + "','" + FixInfoModel.BegiDisCount + "','" + FixInfoModel.ReduValueRe + "','" + FixInfoModel.NetValue + "' ,'" + FixInfoModel.UsedStatus + "',getdate(),'" + FixInfoModel.ModifiedUserID + "','" + FixInfoModel .Remark+ "' )");

          //固定资产计提
          StringBuilder sql_FixWith = new StringBuilder();
          sql_FixWith.AppendLine("Insert into officedba.FixWithInfo (CompanyCD,FixNo,UseDate,CountMethod,EstimateUse,");
          sql_FixWith.AppendLine("UsedYear,EstiResiValue,AccuDeprSubjeCD,DeprCostSubjeCD,EstiWorkLoad,AmorDeprRate,AmorDeprM");
          sql_FixWith.AppendLine(",CurrValueRe,DeprStatus,EndNetValue,MonthWorkLoad,Remark)");
          sql_FixWith.AppendLine("values('" + FixWithModel.CompanyCD + "','" + FixWithModel.FixNo + "','" + FixWithModel.UseDate + "','" + FixWithModel.CountMethod + "'");
          sql_FixWith.AppendLine(", '" + FixWithModel.EstimateUse + "','" + FixWithModel.UsedYear + "','" + FixWithModel.EstiResiValue + "','" + FixWithModel.AccuDeprSubjeCD + "','" + FixWithModel.DeprCostSubjeCD + "', ");
          sql_FixWith.AppendLine("'" + FixWithModel.EstiWorkLoad + "','" + FixWithModel.AmorDeprRate + "','" + FixWithModel.AmorDeprM + "','" + FixWithModel.CurrValueRe + "','" + FixWithModel.DeprStatus + "','" + FixWithModel.EndNetValue + "' ,'" + FixWithModel.MonthWorkLoad + "','" + FixWithModel.Remark + "' )");
          if (sql_FixInfo != null && sql_FixWith != null)
          {
              sqlArray[0] = sql_FixInfo.ToString();
              sqlArray[1] = sql_FixWith.ToString();
          }
          return SqlHelper.ExecuteTransForListWithSQL(sqlArray);
      }
      /// <summary>
      /// 修改固定资产信息及计提信息
      /// </summary>
      /// <param name="FixInfoModel">固定资产实体</param>
      /// <param name="FixWithModel">固定资产计提实体</param>
      /// <returns>true 成功,false 失败</returns>
      public static bool UpdateFixAssetInfo(FixAssetInfoModel FixInfoModel, FixWithInfoModel FixWithModel)
      {
          //固定资产
          string[] sqlArray = new string[2];
          StringBuilder sql_FixInfo = new StringBuilder();
          sql_FixInfo.AppendLine("update officedba.FixAssetInfo set ");
          sql_FixInfo.AppendLine("[FixName] = '" + FixInfoModel .FixName+ "',");
          sql_FixInfo.AppendLine("[FixType] ='" + FixInfoModel .FixType+ "',");
          sql_FixInfo.AppendLine("[FixSpec] = '"+FixInfoModel.FixSpec+"',");
          sql_FixInfo.AppendLine("[FixModel] ='"+FixInfoModel.FixModel+"',");
          sql_FixInfo.AppendLine("[FixNumber] = '" + FixInfoModel .FixNumber+ "',");
          sql_FixInfo.AppendLine("[Unit] = '" + FixInfoModel .Unit+ "',");
          sql_FixInfo.AppendLine("[OriginalValue] = '" + FixInfoModel.OriginalValue + "',");
          sql_FixInfo.AppendLine("[UseDept] = '"+FixInfoModel.UseDept+"',");
          sql_FixInfo.AppendLine("[StorePlace] = '"+FixInfoModel.StorePlace+"',");
          sql_FixInfo.AppendLine("[RespPerson] = '" + FixInfoModel.RespPerson + "',");
          sql_FixInfo.AppendLine("[RegisterDate] = '" + FixInfoModel.RegisterDate + "',");
          sql_FixInfo.AppendLine("[BegiDisCount] = '" + FixInfoModel.BegiDisCount + "',");
          sql_FixInfo.AppendLine("[ReduValueRe] = '" + FixInfoModel.ReduValueRe + "',");
          sql_FixInfo.AppendLine("[NetValue] ='"+FixInfoModel.NetValue+"',");
          sql_FixInfo.AppendLine("[UsedStatus] = '"+FixInfoModel.UsedStatus+"',");
          sql_FixInfo.AppendLine("[ModifiedDate] = getdate(),");
          sql_FixInfo.AppendLine("[ModifiedUserID] ='"+FixInfoModel.ModifiedUserID+"',");
          sql_FixInfo.AppendLine("[Remark] ='" + FixInfoModel.Remark + "' where CompanyCD='" + FixInfoModel.CompanyCD + "' and FixNo='" + FixInfoModel.FixNo + "'");

          //固定资产计提
          StringBuilder sql_FixWith = new StringBuilder();
          sql_FixWith.AppendLine("update officedba.FixWithInfo set ");
          sql_FixWith.AppendLine("[UseDate] = '" + FixWithModel.UseDate + "',");
          sql_FixWith.AppendLine("[CountMethod] = '" + FixWithModel.CountMethod + "',");
          sql_FixWith.AppendLine("[EstimateUse] = '" + FixWithModel.EstimateUse + "',");
          sql_FixWith.AppendLine("[UsedYear] = '" + FixWithModel.UsedYear + "',");
          sql_FixWith.AppendLine("[EstiResiValue] = '" + FixWithModel.EstiResiValue + "',");
          sql_FixWith.AppendLine("[AccuDeprSubjeCD] = '" + FixWithModel.AccuDeprSubjeCD + "',");
          sql_FixWith.AppendLine("[EstiWorkLoad] = '" + FixWithModel.EstiWorkLoad + "',");
          sql_FixWith.AppendLine("[AmorDeprRate] = '" + FixWithModel.AmorDeprRate + "',");
          sql_FixWith.AppendLine("[AmorDeprM] = '" + FixWithModel.AmorDeprM + "',");
          sql_FixWith.AppendLine("[CurrValueRe] = '" + FixWithModel.CurrValueRe + "',");
          sql_FixWith.AppendLine("[DeprStatus] = '" + FixWithModel.DeprStatus + "',");
          sql_FixWith.AppendLine("[EndNetValue] = '" + FixWithModel.EndNetValue + "',");
          sql_FixWith.AppendLine("[MonthWorkLoad] = '" + FixWithModel.MonthWorkLoad + "',");
          sql_FixWith.AppendLine("[Remark] = '" + FixWithModel .Remark+ "'");
          sql_FixWith.AppendLine("Where CompanyCD='" + FixInfoModel.CompanyCD + "' and FixNo='" + FixWithModel.FixNo + "' ");
          if (sql_FixInfo != null && sql_FixWith != null)
          {
              sqlArray[0] = sql_FixInfo.ToString();
              sqlArray[1] = sql_FixWith.ToString();
          }
          return SqlHelper.ExecuteTransForListWithSQL(sqlArray);

        
      }
 /// <summary>
 /// 修改固定资产信息及计提信息
 /// </summary>
 /// <param name="FixInfoModel">固定资产实体</param>
 /// <param name="FixWithModel">固定资产计提实体</param>
 /// <returns>true 成功,false 失败</returns>
 public static bool UpdateFixAssetInfo(FixAssetInfoModel FixInfoModel, FixWithInfoModel FixWithModel)
 {
     if (FixInfoModel == null && FixWithModel == null) return false;
     if (FixInfoModel.CompanyCD == null) FixInfoModel.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
     if (FixInfoModel.ModifiedUserID == null) FixInfoModel.ModifiedUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;
     try
     {
         return FixAssetInfoDBHelper.UpdateFixAssetInfo(FixInfoModel, FixWithModel);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }