diff --git a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/BrrowDoc.cs b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/BrrowDoc.cs index b227086..363d2f9 100644 --- a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/BrrowDoc.cs +++ b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/BrrowDoc.cs @@ -273,7 +273,8 @@ namespace ICSSoft.DataProject else ds = DBHelper.SQlReturnDataSet(sql, cmd); #endregion - + cmd.CommandType = CommandType.Text; + cmd.Parameters.Clear(); } cmd.Transaction.Commit(); } diff --git a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreateAppVouch.cs b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreateAppVouch.cs index a777180..166d9a7 100644 --- a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreateAppVouch.cs +++ b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreateAppVouch.cs @@ -82,7 +82,8 @@ namespace ICSSoft.DataProject dtNew.Merge(dt); //List szJson = JsonConvert.DeserializeObject>(json); //szJson = JsonConvert.DeserializeObject>(json); - + cmd.CommandType = CommandType.Text; + cmd.Parameters.Clear(); } cmd.Transaction.Commit(); } diff --git a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs index 95ddc8b..8767a09 100644 --- a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs +++ b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs @@ -352,15 +352,15 @@ EXEC ICSProcedureUpdatePricePOToPUArrivalVouchs @ID= @ID1 { cmd.Parameters.Add(new SqlParameter("@dVDate", head.MTime.AddYears(iMassDate).Date)); } - if (cMassUnit == 2) + else if (cMassUnit == 2) { cmd.Parameters.Add(new SqlParameter("@dVDate", head.MTime.AddMonths(iMassDate).Date)); } - if (cMassUnit == 3) + else if (cMassUnit == 3) { cmd.Parameters.Add(new SqlParameter("@dVDate", head.MTime.AddDays(iMassDate).Date)); } - cmd.Parameters.Add(new SqlParameter("@dVDate", "")); + else cmd.Parameters.Add(new SqlParameter("@dVDate", "")); cmd.Parameters.Add(new SqlParameter("@imassdate", iMassDate)); cmd.Parameters.Add(new SqlParameter("@cmassunit", cMassUnit)); cmd.Parameters.Add(new SqlParameter("@Batch", body.BatchCode)); @@ -462,7 +462,8 @@ isnull(b.cFree10,'') as cFree10 else ds = DBHelper.SQlReturnDataSet(sql, cmd); - + cmd.CommandType = CommandType.Text; + cmd.Parameters.Clear(); } cmd.Transaction.Commit(); diff --git a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/TransferDoc.cs b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/TransferDoc.cs index 4a4b2ae..8c42b3f 100644 --- a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/TransferDoc.cs +++ b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/TransferDoc.cs @@ -214,7 +214,7 @@ namespace ICSSoft.DataProject bFromPreYear,bIsComplement,iDiscountTaxType,ireturncount, iverifystate,iswfcontrolled,dnmaketime,dnverifytime,bredvouch,cSourceLs,cDepCode) - SELECT @ID,'1','08','调拨入库','调拨',a.cTVCode,cIWhCode,CONVERT(NVARCHAR(15),GETDATE(),23),a.cTVCode,@cRdCode, + SELECT @ID,'1','08','调拨入库','调拨',a.cTVCode,cIWhCode,CONVERT(NVARCHAR(15),GETDATE(),23),@cCode,@cRdCode, @cHandler,@cMemo,'0',@cMaker,CONVERT(NVARCHAR(15),GETDATE(),23),'0','0', @VT_ID,'0','0','0','0','0','0','0','0',GETDATE(),GETDATE(),'0','1',cIDepCode from dbo.TransVouch a WHERE ID='" + head.ID + "' "; @@ -700,7 +700,7 @@ namespace ICSSoft.DataProject bFromPreYear,bIsComplement,iDiscountTaxType,ireturncount, iverifystate,iswfcontrolled,dnmaketime,dnverifytime,bredvouch,cSourceLs,cDepCode) - SELECT @ID,'1','08','调拨入库','调拨',a.cTVCode,cIWhCode,CONVERT(NVARCHAR(15),GETDATE(),23),a.cTVCode,@cRdCode, + SELECT @ID,'1','08','调拨入库','调拨',a.cTVCode,cIWhCode,CONVERT(NVARCHAR(15),GETDATE(),23),@cCode,@cRdCode, @cHandler,@cMemo,'0',@cMaker,CONVERT(NVARCHAR(15),GETDATE(),23),'0','0', @VT_ID,'0','0','0','0','0','0','0','0',GETDATE(),GETDATE(),'0','1',cIDepCode from dbo.TransVouch a WHERE cTVCode='" + iBaseCode + "' "; @@ -1234,7 +1234,7 @@ where A.autoID='" + body.TADetailID + @"' bFromPreYear,bIsComplement,iDiscountTaxType,ireturncount, iverifystate,iswfcontrolled,dnmaketime,dnverifytime,bredvouch,cSourceLs,cDepCode) - SELECT @ID,'1','08','调拨入库','调拨',a.cTVCode,cIWhCode,CONVERT(NVARCHAR(15),GETDATE(),23),a.cTVCode,cIRdCode, + SELECT @ID,'1','08','调拨入库','调拨',a.cTVCode,cIWhCode,CONVERT(NVARCHAR(15),GETDATE(),23),@cCode,cIRdCode, @cHandler,@cMemo,'0',@cMaker,CONVERT(NVARCHAR(15),GETDATE(),23),'0','0', @VT_ID,'0','0','0','0','0','0','0','0',GETDATE(),GETDATE(),'0','1',cIDepCode from dbo.TransVouch a