Exemple #1
0
        public bool DeleteOnlineReturnDAL(int deleteReturnID)
        {
            bool onlineReturnDeleted = false;

            try
            {
                OnlineReturnDAL deleteOnlineReturn = null;
                foreach (OnlineReturnDAL item in onlineReturnList)
                {
                    if (item.ReturnID == deleteReturnID)
                    {
                        deleteOnlineReturn = item;
                    }
                }

                if (deleteOnlineReturn != null)
                {
                    onlineReturnList.Remove(deleteOnlineReturn);
                    onlineReturnDeleted = true;
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(onlineReturnDeleted);
        }
Exemple #2
0
        public bool AddOnlineReturnDAL(OnlineReturnDAL newonlineReturn)
        //adding return order
        {
            bool onlineReturnAdded = false;

            try
            {
                onlineReturnList.Add(newonlineReturn);
                onlineReturnAdded = true;
            }
            catch (SystemException ex)
            {
                throw new Exception(ex.Message);
            }
            return(onlineReturnAdded);
        }
Exemple #3
0
        public OnlineReturnDAL SearchOnlineReturnDAL(int searchReturnID)
        //returnonlineorderby returnID
        {
            OnlineReturnDAL searchOnlineReturnDAL = null;

            try
            {
                foreach (OnlineReturnDAL item in onlineReturnList)
                {
                    if (item.ReturnID == searchReturnID)
                    {
                        searchOnlineReturnDAL = item;
                    }
                }
            }
            catch (SystemException ex)
            {
                throw new Exception(ex.Message);
            }
            return(searchOnlineReturnDAL);
        }
Exemple #4
0
        public bool UpdateReturnOnlineOrderDAL(OnlineReturnDAL updateonlineReturn)
        {
            bool onlineReturnUpdated = false;

            try
            {
                for (int i = 0; i < onlineReturnList.Count; i++)
                {
                    if (onlineReturnList[i].ReturnID == updateonlineReturn.ReturnID)
                    {
                        updateonlineReturn.ReturnPurposeOfReturn = onlineReturnList[i].PurposeOfReturn;
                        updateonlineReturn.ReturnMobileNumber    = onlineReturnList[i].ReturnMobileNumber;
                        onlineReturnUpdated = true;
                    }
                }
            }
            catch (SystemException ex)
            {
                throw new Exception(ex.Message);
            }
            return(onlineReturnUpdated);
        }
Exemple #5
0
 public override void Deserialize()
 {
     FileStream      fs2             = new FileStream(filePath, FileMode.Open, FileAccess.Read);
     BinaryFormatter binaryFormatter = new BinaryFormatter();
     OnlineReturnDAL onlineReturnDAL = (OnlineReturnDAL)binaryFormatter.Deserialize(fs2);
 }