Ejemplo n.º 1
0
 protected void btnGoodsNumberImport_Click(object sender, EventArgs e)
 {
     this.strSavePath = this.path.Value;
     if (File.Exists(this.strSavePath))
     {
         if (this.bolMainIndex)
         {
             DataTable dtGoods     = DataExcelInfo.CheckGoodsNumDataExcel(this.strSavePath);
             DataTable dtGoodsCopy = this.CheckGoodsNumData(dtGoods, true, this._UserShopID);
             if (DataExcelInfo.GoodsImportNums(dtGoodsCopy, this._UserID, this._UserShopID))
             {
                 base.OutputWarn("恭喜您,导入商品库存成功!");
                 this.strSavePath  = "";
                 this.bolMainIndex = false;
             }
             else
             {
                 File.Delete(this.strSavePath);
                 base.OutputWarn("导入商品库存失败,请再次检验并改正商品数据!");
             }
         }
         else
         {
             File.Delete(this.strSavePath);
             base.OutputWarn("您导入的商品库存数据还没有检验成功,请通过检验再导入商品数据。");
         }
     }
     else
     {
         base.OutputWarn("您还没有检验商品库存数据,请先检验数据");
     }
 }