CY_ECommercePlatform/CY.SQLDAL/EC/EC_OrderExtendDAL.cs
@@ -97,6 +97,28 @@
                     delayTime,
                      new SqlParameter("@Productionprogress",trueModel.Productionprogress),
                       new SqlParameter("@PrintPackDeliveryRequir",trueModel.PrintPackDeliveryRequir),
                       new SqlParameter("@printunit",trueModel.printunit),
                         new SqlParameter("@Duiyinghetongbianhao",trueModel.Duiyinghetongbianhao),
                            new SqlParameter("@ShejiStatus",trueModel.ShejiStatus.HasValue?trueModel.ShejiStatus.Value:0),
                               new SqlParameter("@Shejirenyuan",trueModel.Shejirenyuan.HasValue?trueModel.Shejirenyuan.Value:0),
                                  new SqlParameter("@ShejirenyuanName",string.IsNullOrEmpty(trueModel.ShejirenyuanName)?"":trueModel.ShejirenyuanName),
                                     new SqlParameter("@Shejileixing",trueModel.Shejileixing.HasValue?trueModel.Shejileixing.Value:0),
                                        new SqlParameter("@ShejileixingName",string.IsNullOrEmpty(trueModel.ShejileixingName)?"":trueModel.ShejileixingName),
                                           new SqlParameter("@Danshuangmian",string.IsNullOrEmpty(trueModel.Danshuangmian)?"":trueModel.Danshuangmian),
                                              new SqlParameter("@Shejirenyuanneiye",trueModel.Shejirenyuanneiye.HasValue?trueModel.Shejirenyuanneiye.Value:0),
                                                 new SqlParameter("@ShejirenyuanNameneiye",string.IsNullOrEmpty(trueModel.ShejirenyuanNameneiye)?"":trueModel.ShejirenyuanNameneiye),
                                                    new SqlParameter("@Shejileixingneiye",trueModel.Shejileixingneiye.HasValue?trueModel.Shejileixingneiye.Value:0),
                                                       new SqlParameter("@ShejileixingNameneiye",string.IsNullOrEmpty(trueModel.ShejileixingNameneiye)?"":trueModel.ShejileixingNameneiye),
                                                          new SqlParameter("@Danshuangmianneiye",string.IsNullOrEmpty(trueModel.Danshuangmianneiye)?"":trueModel.Danshuangmianneiye),
                                                             new SqlParameter("@Shejiyaoqiu",string.IsNullOrEmpty(trueModel.Shejiyaoqiu)?"":trueModel.Shejiyaoqiu),
                                                                new SqlParameter("@Shejiyaoqiuneiye",string.IsNullOrEmpty(trueModel.Shejiyaoqiuneiye)?"":trueModel.Shejiyaoqiuneiye),
                                                                   new SqlParameter("@ShejiUnitPrice",trueModel.ShejiUnitPrice.HasValue?trueModel.ShejiUnitPrice.Value:0),
                                                                      new SqlParameter("@ShejiSumPrice",trueModel.ShejiSumPrice.HasValue?trueModel.ShejiSumPrice.Value:0),
                                                                         new SqlParameter("@ShejiUnitPriceneiye",trueModel.ShejiUnitPriceneiye.HasValue?trueModel.ShejiUnitPriceneiye.Value:0),
                                                                            new SqlParameter("@ShejiSumPriceneiye",trueModel.ShejiSumPriceneiye.HasValue?trueModel.ShejiSumPriceneiye.Value:0),
                                                                              new SqlParameter("@Shejicount",trueModel.Shejicount.HasValue?trueModel.Shejicount.Value:0),
                                                                            new SqlParameter("@Shejicountneiye",trueModel.Shejicountneiye.HasValue?trueModel.Shejicountneiye.Value:0),
            };
            int i = -1;
@@ -158,6 +180,27 @@
                    new SqlParameter("@NumPerBag",trueModel.NumPerBag),
                    new SqlParameter("@BagNum",trueModel.BagNum),
                       new SqlParameter("@PrintPackDeliveryRequir",trueModel.PrintPackDeliveryRequir),
                       new SqlParameter("@printunit",trueModel.printunit),
                         new SqlParameter("@Duiyinghetongbianhao",trueModel.Duiyinghetongbianhao),
                          new SqlParameter("@ShejiStatus",trueModel.ShejiStatus.HasValue?trueModel.ShejiStatus.Value:0),
                               new SqlParameter("@Shejirenyuan",trueModel.Shejirenyuan.HasValue?trueModel.Shejirenyuan.Value:0),
                                  new SqlParameter("@ShejirenyuanName",string.IsNullOrEmpty(trueModel.ShejirenyuanName)?"":trueModel.ShejirenyuanName),
                                     new SqlParameter("@Shejileixing",trueModel.Shejileixing.HasValue?trueModel.Shejileixing.Value:0),
                                        new SqlParameter("@ShejileixingName",string.IsNullOrEmpty(trueModel.ShejileixingName)?"":trueModel.ShejileixingName),
                                           new SqlParameter("@Danshuangmian",string.IsNullOrEmpty(trueModel.Danshuangmian)?"":trueModel.Danshuangmian),
                                              new SqlParameter("@Shejirenyuanneiye",trueModel.Shejirenyuanneiye.HasValue?trueModel.Shejirenyuanneiye.Value:0),
                                                 new SqlParameter("@ShejirenyuanNameneiye",string.IsNullOrEmpty(trueModel.ShejirenyuanNameneiye)?"":trueModel.ShejirenyuanNameneiye),
                                                    new SqlParameter("@Shejileixingneiye",trueModel.Shejileixingneiye.HasValue?trueModel.Shejileixingneiye.Value:0),
                                                       new SqlParameter("@ShejileixingNameneiye",string.IsNullOrEmpty(trueModel.ShejileixingNameneiye)?"":trueModel.ShejileixingNameneiye),
                                                          new SqlParameter("@Danshuangmianneiye",string.IsNullOrEmpty(trueModel.Danshuangmianneiye)?"":trueModel.Danshuangmianneiye),
                                                             new SqlParameter("@Shejiyaoqiu",string.IsNullOrEmpty(trueModel.Shejiyaoqiu)?"":trueModel.Shejiyaoqiu),
                                                                new SqlParameter("@Shejiyaoqiuneiye",string.IsNullOrEmpty(trueModel.Shejiyaoqiuneiye)?"":trueModel.Shejiyaoqiuneiye),
                                                                   new SqlParameter("@ShejiUnitPrice",trueModel.ShejiUnitPrice.HasValue?trueModel.ShejiUnitPrice.Value:0),
                                                                      new SqlParameter("@ShejiSumPrice",trueModel.ShejiSumPrice.HasValue?trueModel.ShejiSumPrice.Value:0),
                                                                         new SqlParameter("@ShejiUnitPriceneiye",trueModel.ShejiUnitPriceneiye.HasValue?trueModel.ShejiUnitPriceneiye.Value:0),
                                                                            new SqlParameter("@ShejiSumPriceneiye",trueModel.ShejiSumPriceneiye.HasValue?trueModel.ShejiSumPriceneiye.Value:0),
                                                                              new SqlParameter("@Shejicount",trueModel.Shejicount.HasValue?trueModel.Shejicount.Value:0),
                                                                            new SqlParameter("@Shejicountneiye",trueModel.Shejicountneiye.HasValue?trueModel.Shejicountneiye.Value:0),
            };
            try
            {
@@ -354,9 +397,87 @@
            }
        }
        /// <summary>
        /// 更新订单扩展表剩余印刷数量
        /// </summary>
        /// <param name="Keyid"></param>
        /// <param name="SurplusPrintNum"></param>
        /// <param name="Operator"></param>
        /// <returns></returns>
        public bool UpSurplusPrintNumsql(int? Keyid, int? SurplusPrintNum, string Operator)
        {
            try
            {
              var  sqlStr = "UPDATE [EC_OrderExtend] SET [SurplusPrintNum]=[PrintNum]  WHERE Keyid=@Keyid ";
                SqlParameter par = new SqlParameter("@Keyid", Keyid);
                _dataBase.ExecuteSql(sqlStr, par);
                return true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// 更新订单扩展表剩余印刷数量
        /// </summary>
        /// <param name="Keyid"></param>
        /// <param name="SurplusPrintNum"></param>
        /// <param name="Operator"></param>
        /// <returns></returns>
        public bool UpShejiStatus(int Keyid, int ShejiStatus, string Operator)
        {
            try
            {
                var sqlStr = "UPDATE [EC_OrderExtend] SET [ShejiStatus]="+ ShejiStatus + "  WHERE Keyid=@Keyid ";
                SqlParameter par = new SqlParameter("@Keyid", Keyid);
                _dataBase.ExecuteSql(sqlStr, par);
                return true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public bool UpdateModel(Infrastructure.Domain.IAggregateRoot model)
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 根据编号获得信息
        /// </summary>
        /// <param name="Keyid">编号</param>
        /// <returns></returns>
        public EC_OrderExtend GetModelByKeyid(int keyid)
        {
            try
            {
                string condition = "  ";
                    condition = " Keyid=" + keyid + "";
                //  return null;//错误数据返会空
                IList<EC_OrderExtend> result = _dataBase.SelectModel<EC_OrderExtend>("*", "EC_OrderExtend", condition) as IList<EC_OrderExtend>;//执行查询
                return (null == result || result.Count == 0) ? null : result[0];//返回结果
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}