protected void Page_Load(object sender, EventArgs e)
        {
            var targetTitle  = Request.Form["targettitle"].ToString();
            var targetDay    = Convert.ToDateTime(Request.Form["targetday"].ToString());
            var targetAmount = Convert.ToDecimal(Request.Form["targetamount"].ToString());
            var conn         = ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString;
            var targetHndler = new RepDayOffDAL(conn);
            var targetObj    = new StatsTargetConfig()
            {
                IsReached    = false,
                TargetAmount = targetAmount,
                TargetDay    = targetDay,
                TargetTitle  = targetTitle
            };
            var userid = Convert.ToInt32(Session["LoggedUserID"].ToString());

            targetHndler.InsertIntoTargetConfig(targetObj, userid);


            Response.Write("Ok");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //Xero Model Create Contact Unit Test
            XeroIntergration xero = new XeroIntergration();

            //Create Contact
            //Repository repos = xero.CreateRepository();
            // XeroApi.Model.Contact DeltoneContact ;
            // XeroApi.Model.Item item;


            //DeltoneContact = xero.CreateContact(repos, "DeltoneTestCompan_5", "Shehan", "Peris", "4", "61", "2434684", String.Empty, String.Empty, String.Empty, "4", "61", "123456", "*****@*****.**", "12 Kauri Grove", "Spingwale", "Australia", "3150", "VIC", "26 Tamarisk Avenue", "Glen waverley", "Australia", "3150", "VIC");

            //Response.Write(DeltoneContact.ContactID);//Fetch the Contact ID Created in Xero System .store it in the Dletone Contact Table


            //Fetch the Contact by Guid
            //DeltoneContact = xero.findContact(repos, "7B08CAB7-7157-4EFC-954C-59B3FC43F7C5");
            //Response.Write(DeltoneContact.FirstName);


            //Deltone Test Create Item
            //xero.CreateItem(repos, "DeltoneItem", "DeltoneTestDescription", (Decimal)salesUnitPrice, (Decimal)purchaseunitPrice);

            //Deltone Update Item

            //Update an Invoice
            String strGuid = "adsfhajhsdfkjhajdshf";
            //xero.UpdtateInvoice(repos, strGuid);


            //XeroIntergration xero = new XeroIntergration();
            //Repository repos = xero.CreateRepository();

            String Guid = "4dc4e979-11e5-4994-a6a9-912c102d3a13";// Expected value
            //String companyname = "REGIONAL SERVICES AUSTRALIA PTY LTD";
            String companyname = "AUSJET";
            // string ActualValue = xero.findContactByName(repos, companyname); //Actual Value

            QuoteDAL quote = new QuoteDAL(ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString);
            // var sss = quote.GetAllQuotesByCompany(176); //360

            // var testName = "Janine O'Connell";
            // var ttt= testName.Insert(8, "\\");

            var tttt = new CallNDataHandler();
            //  tttt.TestFileDownload();

            var mmm = new RepDayOffDAL(ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString);

            var obj = new StatsTargetConfig()
            {
                IsReached    = false,
                TargetAmount = 7000,
                TargetDay    = DateTime.Now.AddDays(2),
                TargetTitle  = "Lunch Target"
            };

            //  mmm.InsertIntoTargetConfig(obj, 1);

            // var result = mmm.GetAllTargetItems();

            //mmm.DeleteTargetConfig(2);

            //  mmm.UpdateTargetConfig(5, true);

            var ddd = new CreditNoteRMAHandler(ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString);

            // var nnn= ddd.GetRMANotesById(100);

            //  SendMail();

            SendCreditCardNotificationEmail(0);
        }