Exemple #1
0
        public IActionResult OnPost()
        {
            int      CardNumLength = CardNumber.ToString().Length;
            int      ExpDateLength = ExpDate.ToString().Length;
            int      CVVLength     = CVV.ToString().Length;
            DateTime da;

            if (CardNumLength == 16)
            {
                if (DateTime.TryParseExact(ExpDate.ToString(), "MM/yy", null, System.Globalization.DateTimeStyles.None, out da))
                {
                    Console.WriteLine("DateTime = success");
                    if (CVVLength != 3)
                    {
                        Console.WriteLine("CVV success");
                    }
                }
                else
                {
                    Console.WriteLine("Please use the correct format");
                }
            }
            else
            {
                Console.WriteLine("The Card Number must be 16 digits");
            }

            return(RedirectToPage("/Index"));
        }
 public int CompareTo(ExpirationDate other)
 {
     if (ReferenceEquals(this, other))
     {
         return(0);
     }
     if (ReferenceEquals(null, other))
     {
         return(1);
     }
     return(ExpDate.CompareTo(other.ExpDate));
 }
        void ReleaseDesignerOutlets()
        {
            if (address != null)
            {
                address.Dispose();
                address = null;
            }

            if (APNSSummary != null)
            {
                APNSSummary.Dispose();
                APNSSummary = null;
            }

            if (AppValue != null)
            {
                AppValue.Dispose();
                AppValue = null;
            }

            if (Cashout != null)
            {
                Cashout.Dispose();
                Cashout = null;
            }

            if (Comparebook != null)
            {
                Comparebook.Dispose();
                Comparebook = null;
            }

            if (ExpDate != null)
            {
                ExpDate.Dispose();
                ExpDate = null;
            }

            if (VehicleDetails != null)
            {
                VehicleDetails.Dispose();
                VehicleDetails = null;
            }
        }
 public void clear()
 {
     txtItemName.Text   = "";
     txtCompany.Text    = "";
     txtNewQty.Text     = "";
     txtPurPer.Text     = "";
     txtPurPrice.Text   = "";
     txtSalePrice.Text  = "";
     txtTotalAmt.Text   = "";
     txtNetAmt.Text     = "";
     txtDiscount.Text   = "";
     txtPitemGStax.Text = "";
     txtTotalGst.Text   = "";
     txtInv.Text        = "";
     txtVendorId.Text   = "";
     txtVName.Text      = "";
     txtUPrice.Text     = "";
     txtBarcode.Text    = "";
     purDate.ResetText();
     ExpDate.ResetText();
 }
        public override bool Equals(object paramObject)
        {
            if (!(paramObject is LicenseRowItem))
            {
                return(false);
            }
            if (paramObject == this)
            {
                return(true);
            }
            LicenseRowItem licenseRowItem = (LicenseRowItem)paramObject;
            bool           @bool          = false;

            if (CheckedIn == licenseRowItem.CheckedIn && CID.Equals(licenseRowItem.CID, StringComparison.OrdinalIgnoreCase) && Userid.Equals(licenseRowItem.Userid, StringComparison.OrdinalIgnoreCase) && CheckedInDate.Equals(licenseRowItem.CheckedInDate) && ExpDate.Equals(licenseRowItem.ExpDate))
            {
                @bool = true;
            }
            return(@bool && hasSamePlugins(licenseRowItem));
        }
 public override string ToString()
 {
     null = "" + this.checkedIn + "," + this.CID_Conflict + "," + this.userid + "," + CheckedInDate + "," + ExpDate.ToString() + ",";
     foreach (string str in this.plugIns)
     {
         null = null + "," + str + "";
     }
     return(null + "," + this.serial);
 }
Exemple #7
0
        void ReleaseDesignerOutlets()
        {
            if (address != null)
            {
                address.Dispose();
                address = null;
            }

            if (apnsAlert != null)
            {
                apnsAlert.Dispose();
                apnsAlert = null;
            }

            if (apnsCloseButton != null)
            {
                apnsCloseButton.Dispose();
                apnsCloseButton = null;
            }

            if (APNSDone != null)
            {
                APNSDone.Dispose();
                APNSDone = null;
            }

            if (APNSMessage != null)
            {
                APNSMessage.Dispose();
                APNSMessage = null;
            }

            if (APNSSummary != null)
            {
                APNSSummary.Dispose();
                APNSSummary = null;
            }

            if (AppValue != null)
            {
                AppValue.Dispose();
                AppValue = null;
            }

            if (Cashout != null)
            {
                Cashout.Dispose();
                Cashout = null;
            }

            if (CloseBtn != null)
            {
                CloseBtn.Dispose();
                CloseBtn = null;
            }

            if (Comparebook != null)
            {
                Comparebook.Dispose();
                Comparebook = null;
            }

            if (ExpDate != null)
            {
                ExpDate.Dispose();
                ExpDate = null;
            }

            if (VehicleDetails != null)
            {
                VehicleDetails.Dispose();
                VehicleDetails = null;
            }
        }
 /// <summary>
 /// Basic override for logging purposes
 /// </summary>
 /// <returns></returns>
 public override string ToString() =>
 $"Name: {Name}, Type: {Method}, Number: {Number.MaskCC()}, Exp: {ExpDate.ToExpDate()}";
        public bool AddNewProduct(Product product)
        {
            int id = Convert.ToInt32(Functions.IDGeneration(MyShopConfigration.Products)) + 1;

            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Id", id.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Name", Name);
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Price", Price.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "ExpDate", ExpDate.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "ManDate", ManDate.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "CompanyName", CompanyName);
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Quntity", Quntity.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Features", Features);
            return(true);
        }
Exemple #10
0
 /* Methods */
 public override string ToString()
 {
     return($"{CardNum}\t{ExpDate.ToString("MM'/'y")}\t{Cvv}");
 }