예제 #1
0
        public Result SaveDETDirectEntry(DETDirectEntryDTO obj)
        {
            try
            {
                // PurchaseBillId
                //sessionState.SetCachedValue(privateKey, {some integer value});


                using (DbCommand cmd = Common.dbConn.GetStoredProcCommand("DETPurchaseBillSave"))
                {
                    Common.dbConn.AddInParameter(cmd, "@MSTPurchaseBillId", DbType.Int32, obj.Id);
                    Common.dbConn.AddInParameter(cmd, "@SNo", DbType.Int32, obj.SNo);
                    Common.dbConn.AddInParameter(cmd, "@MaterialDesc", DbType.Int32, obj.MaterialDesc);
                    Common.dbConn.AddInParameter(cmd, "@UMO", DbType.Int32, obj.UMOId);
                    Common.dbConn.AddInParameter(cmd, "@Qty", DbType.Double, obj.Qty);
                    Common.dbConn.AddInParameter(cmd, "@Rate", DbType.Double, obj.Rate);
                    Common.dbConn.AddInParameter(cmd, "@TotalAmount", DbType.Double, obj.TotalAmount);
                    Common.dbConn.ExecuteNonQuery(cmd);
                    return(new Result {
                        Id = 1, Message = "Saved", ResultStatus = OperationStatus.SavedSuccessFully
                    });
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(null);
        }
예제 #2
0
        public Result SaveDETPurchaseBill(ERPDTOBase obj)
        {
            DETDirectEntryDTO account = obj as DETDirectEntryDTO;

            return(new DirectEntryDAL().SaveDETDirectEntry(account));
        }