Exemple #1
0
 public static Store GetStoreByTypeID(int typid)
 {
     DAL.StoreDetails strdet = myRealProvider.GetStoreByTypeID(typid);
     if (strdet == null)
     {
         return(null);
     }
     return(new Store(strdet.ID, strdet.TypeId, strdet.Amount, new MyDateTime(strdet.AddedDateClient), new  MyDateTime(strdet.AddedDateClient), strdet.TypeName));
 }
Exemple #2
0
 internal static bool ISinStore(int typeid, int amnt)
 {
     DAL.StoreDetails teststore = SalePointDal.GetStoreByTypeID(typeid);
     if (teststore != null)
     {
         if ((teststore.Amount < amnt))
         {
             MessageBox.Show(" لا تتوفر هذه الكمية من الصنف  " + teststore.TypeName, "الكميات المتوفرة-المخزن", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false);
         }
     }
     else
     {
         MessageBox.Show(" صنف غير موجود بالمخزن", "الكميات المتوفرة-المخزن", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false);
     }
     return(true);
 }