public Result SaveDETGRN(DETGRNDTO oDETGRNDTO) { try { using (DbCommand cmd = ERPDAL.Common.dbConn.GetStoredProcCommand("DETGRNBillSave")) { ERPDAL.Common.dbConn.AddInParameter(cmd, "@Id", DbType.Int32, oDETGRNDTO.Id); ERPDAL.Common.dbConn.AddInParameter(cmd, "@SNo", DbType.Int32, oDETGRNDTO.SNo); ERPDAL.Common.dbConn.AddInParameter(cmd, "@MaterialDescId", DbType.Int32, oDETGRNDTO.MaterialDesc); ERPDAL.Common.dbConn.AddInParameter(cmd, "@UnitCodeId", DbType.Int32, oDETGRNDTO.UnitCode); ERPDAL.Common.dbConn.AddInParameter(cmd, "@DC", DbType.Double, oDETGRNDTO.DC); ERPDAL.Common.dbConn.AddInParameter(cmd, "@Recieved", DbType.Double, oDETGRNDTO.Recieved); ERPDAL.Common.dbConn.AddInParameter(cmd, "@AcceptedIntoStock", DbType.Double, oDETGRNDTO.AcceptedIntoStock); ERPDAL.Common.dbConn.AddInParameter(cmd, "@MaterialCheckingSlipNo", DbType.String, oDETGRNDTO.MaterialCheckingSlipNo); ERPDAL.Common.dbConn.AddInParameter(cmd, "@Value", DbType.Double, oDETGRNDTO.Value); DataSet dsResult = ERPDAL.Common.dbConn.ExecuteDataSet(cmd); // return new Result { Id = ((dsResult.Tables[0].Rows[0]["Result"])).ToInt(),Message="Saved", ResultStatus = OperationStatus.SavedSuccessFully }; return(new Result { Id = 1, Message = "Saved", ResultStatus = OperationStatus.SavedSuccessFully }); } } catch (Exception ex) { throw ex; } }
public Result SaveDET(ERPDTOBase obj) { DETGRNDTO oDETGRNDTO = obj as DETGRNDTO; return(new GRNDAL().SaveDETGRN(oDETGRNDTO)); }