public responseCls signUpForm(signUps expositions)
        {
            customer app = new customer();

            app.Id       = entities.customers.Count() + 1;
            app.fname    = expositions.fname;
            app.lname    = expositions.lname;
            app.phone    = expositions.phone;
            app.gender   = expositions.gender;
            app.email    = expositions.email;
            app.fax      = expositions.fax;
            app.password = expositions.password;

            entities.customers.Add(app);

            Login log = new Login();

            log.Id       = entities.Logins.Count() + 1;
            log.custID   = (entities.customers.Count() + 1).ToString();
            log.userName = expositions.email;
            log.password = expositions.password;

            entities.Logins.Add(log);

            entities.SaveChanges();

            responseCls res = new responseCls();

            res.status  = 400;
            res.success = "successfully sign up";

            return(res);
        }
        public responseCls saveAppoinmentMobile(submit expositions)
        {
            Appoinment app = new Appoinment();

            app.Id     = entities.Appoinments.Count() + 1;
            app.custID = "123";
            app.docID  = expositions.doctor.Id;
            app.time   = expositions.time;

            entities.Appoinments.Add(app);

            mobile mob = new mobile();

            mob.Id      = entities.mobiles.Count() + 1;
            mob.amount  = expositions.amount;
            mob.custID  = "123";
            mob.mobile1 = expositions.phone;
            mob.pin     = expositions.pin;

            entities.mobiles.Add(mob);

            entities.SaveChanges();

            responseCls res = new responseCls();

            res.status  = 400;
            res.success = "Data successfully saved";

            return(res);
        }
        public responseCls loginForm(loginCls expositions)
        {
            var emp = from e in entities.Logins
                      where e.userName == expositions.userName && e.password == expositions.password
                      select e;


            responseCls res = new responseCls();

            if (emp.Count() > 0)
            {
                res.status  = 200;
                res.success = "successfully logged in";
                var firstOne = emp.First();

                dataCls d = new dataCls();
                d.userName = firstOne.userName;
                res.value  = d;
            }
            else
            {
                res.status  = 400;
                res.success = "invalid username or password";
            }

            return(res);
        }
        public responseCls saveCredits(submit expositions)
        {
            Appoinment app = new Appoinment();

            app.Id     = entities.Appoinments.Count() + 1;
            app.custID = "123";
            app.docID  = expositions.doctor.Id;
            app.time   = expositions.time;

            entities.Appoinments.Add(app);

            credit cre = new credit();

            cre.custID   = "123";
            cre.Id       = entities.credits.Count() + 1;
            cre.amount   = expositions.amount;
            cre.cardName = expositions.cardName;
            cre.cardNo   = expositions.cardNo;
            cre.csv      = expositions.csv;
            cre.date     = expositions.cardYear + '-' + expositions.cardMonth;

            entities.credits.Add(cre);
            sendMail(expositions);
            entities.SaveChanges();
            responseCls res = new responseCls();

            res.status  = 400;
            res.success = "credit card payment is saved";
            return(res);
        }
        public responseCls loginFormOption(loginCls expositions)
        {
            responseCls res = new responseCls();

            res.status  = 400;
            res.success = "successfully sign up";

            return(res);
        }
        public responseCls saveCreditsOption(submit expositions)
        {
            responseCls res = new responseCls();

            res.status  = 400;
            res.success = "Data successfully saved";

            return(res);
        }
        public responseCls saveAppoinmentMobileOption(submit expositions)
        {
            responseCls res = new responseCls();

            res.status  = 400;
            res.success = "Data successfully saved";

            return(res);
        }