Exemplo n.º 1
0
        public T102 ClientInit()
        {
            Request request = new Request(appConfig);

            request.GlobalInfo.InterfaceCode = "T102";
            T102 response = (T102)SendRequest(request);

            File.WriteAllText(appConfig.EFRISPublicKey, response.ServerPublicKey);
            string initializationAESKey = appConfig.TaxpayerID.Substring(0, 10) + DateTime.Now.ToString("ddMMy");

            File.WriteAllText(appConfig.PrivateKey, Encoding.UTF8.GetString(EncryptionHelper.Decrypt(Convert.FromBase64String(response.ClientPrivateKey), Encoding.UTF8.GetBytes(initializationAESKey))));
            return(response);
        }
Exemplo n.º 2
0
        public ActionResult DeductionUpdate(T102 t)
        {
            bool Taxable     = (Request["Taxable"] == "on") ? true : false;
            bool FICATaxable = (Request["FICATaxable"] == "on") ? true : false;
            bool PctofIncome = (Request["PctofIncome"] == "on") ? true : false;
            bool W2Box10     = (Request["W2Box10"] == "on") ? true : false;
            bool W2Box12     = (Request["W2Box12"] == "on") ? true : false;
            T102 tItem       = db.T102.Find(t.Id);

            tItem.Description     = t.Description;
            tItem.AnnualLimit     = t.AnnualLimit;
            tItem.Taxable         = Taxable;
            tItem.FICATaxable     = FICATaxable;
            tItem.PctofIncome     = PctofIncome;
            tItem.W2Box10         = W2Box10;
            tItem.W2Box12         = W2Box12;
            tItem.W2Code          = t.W2Code;
            db.Entry(tItem).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
            return(RedirectToAction("Deduction"));
        }
Exemplo n.º 3
0
 static bool Do102(T102 t) {
   Nullable<T102> n = new Nullable<T102>(t);
   return Ensure(n.HasValue && n.Value == t);
 }