public Result Save(SaleOrderReceivingEntryDTO obj) { try { int MSTSaleOrderReceivingEntryId = 0; using (DbCommand cmd = Common.dbConn.GetStoredProcCommand("DETSaleOrderReceivingDetail")) { Common.dbConn.AddInParameter(cmd, "MSTSaleOrderReceivingEntryId", DbType.Int32, obj.Id); //Common.dbConn.AddInParameter(cmd, "OrderNo", DbType.String, obj.OrderNo); //if (obj.OrderDate == DateTime.MinValue) //{ // Common.dbConn.AddInParameter(cmd, "OrderDate", DbType.Date, System.DBNull.Value); //} //else //{ // Common.dbConn.AddInParameter(cmd, "OrderDate", DbType.Date, obj.OrderDate); //} //Common.dbConn.AddInParameter(cmd, "PartyName", DbType.String, obj.PartyName); //Common.dbConn.AddInParameter(cmd, "Active", DbType.Boolean, obj.Active); //Common.dbConn.AddInParameter(cmd, "Remarks", DbType.String, obj.Remarks); Common.dbConn.AddInParameter(cmd, "SNo", DbType.Int32, obj.SNo); Common.dbConn.AddInParameter(cmd, "ItemMasId", DbType.Int32, obj.ItemDescription); Common.dbConn.AddInParameter(cmd, "Qty", DbType.Double, obj.Qty); Common.dbConn.AddInParameter(cmd, "Rate", DbType.Double, obj.Rate); Common.dbConn.AddInParameter(cmd, "Amount", DbType.Double, obj.Amount); //Common.dbConn.AddInParameter(cmd, "Total", DbType.Double, obj.Total); Common.dbConn.ExecuteNonQuery(cmd); return(new Result { Id = 1, Message = "Saved", ResultStatus = OperationStatus.SavedSuccessFully }); } } catch (Exception ex) { throw ex; } }
public Result Save(ERPDTOBase obj) { SaleOrderReceivingEntryDTO account = obj as SaleOrderReceivingEntryDTO; return(new SaleOrderReceivingEntryDAL().Save(account)); }