public ActionResult Processed(int id, string processed_by)
        {
            try
            {
                radioclubEntities _entities     = new radioclubEntities();
                member_update     entititySetup = new member_update {
                    member_id = id
                };

                var user = _entities.member_update.Find(id);
                user.processed_by           = processed_by;
                user.processed_on           = DateTime.Now;
                user.data_processed         = 1;
                _entities.Entry(user).State = EntityState.Modified;
                _entities.SaveChanges();
                TempData["ResDataProcessed"] = "Data Processed Successfully!";
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                string err = ex.Message + "....." + ex.StackTrace;
                return(View());
            }
        }
        public ActionResult Create(MemberViewModel model)
        {
            try
            {
                //string hostName = Dns.GetHostName();
                //string myIP = Dns.GetHostByName(hostName).AddressList[0].ToString();
                string myIP = GetIPAddress();
                if (ModelState.IsValid)
                {
                    radioclubEntities _entities     = new radioclubEntities();
                    member_update     entititySetup = new member_update();

                    entititySetup.membership_no          = model.membership_no;
                    entititySetup.first_name             = model.first_name;
                    entititySetup.middle_name            = model.middle_name;
                    entititySetup.last_name              = model.last_name;
                    entititySetup.dob                    = model.dob;
                    entititySetup.persent_merital_status = model.persent_merital_status;
                    entititySetup.marriage_date          = model.marriage_date;
                    entititySetup.nationality            = model.nationality;
                    entititySetup.occupation             = model.occupation;
                    entititySetup.divorce_date           = model.divorce_date;
                    entititySetup.pancard                = model.pancard;
                    entititySetup.aadharcard             = model.aadharcard;
                    entititySetup.spouse_full_name       = model.spouse_full_name;
                    entititySetup.spouse_dob             = model.spouse_dob;
                    entititySetup.spouse_nationality     = model.spouse_nationality;
                    entititySetup.spouse_occupation      = model.spouse_occupation;
                    entititySetup.spouse_pancard         = model.spouse_pancard;
                    entititySetup.spouse_aadharcard      = model.spouse_aadharcard;
                    entititySetup.residential_address    = model.residential_address;
                    entititySetup.residential_pincode    = model.residential_pincode;
                    entititySetup.company_name           = model.company_name;
                    entititySetup.business_type          = model.business_type;
                    entititySetup.position_held          = model.position_held;
                    entititySetup.office_address         = model.office_address;
                    entititySetup.office_pincode         = model.office_pincode;
                    entititySetup.office_telep           = model.office_telep;
                    entititySetup.residential_tele       = model.residential_tele;
                    entititySetup.mobile_no              = model.mobile_no;
                    entititySetup.fax_no                 = model.fax_no;
                    entititySetup.email_id               = model.email_id;
                    entititySetup.communi_by_email       = model.communi_by_email;
                    entititySetup.device_info            = model.device_info;
                    entititySetup.ipaddress              = myIP;
                    entititySetup.member_image           = model.member_image;
                    entititySetup.spouse_image           = model.spouse_image;
                    entititySetup.marriage_certi_img     = model.marriage_certi_img;
                    entititySetup.member_pan_image       = model.member_pan_image;
                    entititySetup.spouse_pan_img         = model.spouse_pan_img;
                    entititySetup.member_aadhar_img      = model.member_aadhar_img;
                    entititySetup.spouse_aadhar_img      = model.spouse_aadhar_img;
                    entititySetup.member_passport_img    = model.member_passport_img;
                    entititySetup.spouse_passport_img    = model.spouse_passport_img;
                    entititySetup.record_date            = DateTime.Now;

                    entititySetup.member_sign         = model.member_sign;
                    entititySetup.spouse_sign         = model.spouse_sign;
                    entititySetup.divorce_certi_image = model.divorce_certi_image;

                    entititySetup.child_info             = model.child_info;
                    _entities.Entry(entititySetup).State = EntityState.Added;
                    _entities.SaveChanges();
                    TempData["ResponseCssClass"] = "alert-success";
                    TempData["ResponseMessage"]  = "Your request for updation of data is received.";
                    //return RedirectToAction("GetMemberInfo");
                    return(RedirectToAction("GetMemberInfo", new
                    {
                        membership_no = model.membership_no,
                        pan_card = model.pancard
                    }));
                }
                else
                {
                    return(PartialView("_Create", model));
                }
            }
            catch (Exception ex)
            {
                string error = ex.Message;
                return(PartialView("_Create", model));
            }
        }
        public ActionResult Create(MemberViewModel model)
        {
            //string hostName = Dns.GetHostName();
            //string myIP = Dns.GetHostByName(hostName).AddressList[0].ToString();
            string myIP = GetIPAddress();

            //model.child_info.Add(new child_info()
            //{

            //});
            if (ModelState.IsValid)
            {
                radioclubEntities _entities     = new radioclubEntities();
                member_update     entititySetup = new member_update();

                entititySetup.membership_no          = model.membership_no;
                entititySetup.first_name             = model.first_name;
                entititySetup.middle_name            = model.middle_name;
                entititySetup.last_name              = model.last_name;
                entititySetup.dob                    = model.dob;
                entititySetup.persent_merital_status = model.persent_merital_status;
                entititySetup.marriage_date          = model.marriage_date;
                entititySetup.nationality            = model.nationality;
                entititySetup.occupation             = model.occupation;
                entititySetup.divorce_date           = model.divorce_date;
                entititySetup.pancard                = model.pancard;
                entititySetup.aadharcard             = model.aadharcard;
                entititySetup.spouse_full_name       = model.spouse_full_name;
                entititySetup.spouse_dob             = model.spouse_dob;
                entititySetup.spouse_nationality     = model.spouse_nationality;
                entititySetup.spouse_occupation      = model.spouse_occupation;
                entititySetup.spouse_pancard         = model.spouse_pancard;
                entititySetup.spouse_aadharcard      = model.spouse_aadharcard;
                entititySetup.residential_address    = model.residential_address;
                entititySetup.residential_pincode    = model.residential_pincode;
                entititySetup.company_name           = model.company_name;
                entititySetup.business_type          = model.business_type;
                entititySetup.position_held          = model.position_held;
                entititySetup.office_address         = model.office_address;
                entititySetup.office_pincode         = model.office_pincode;
                entititySetup.office_telep           = model.office_telep;
                entititySetup.residential_tele       = model.residential_tele;
                entititySetup.mobile_no              = model.mobile_no;
                entititySetup.fax_no                 = model.fax_no;
                entititySetup.email_id               = model.email_id;
                entititySetup.communi_by_email       = model.communi_by_email;
                entititySetup.device_info            = model.device_info;
                entititySetup.ipaddress              = myIP;
                entititySetup.member_image           = model.member_image;
                entititySetup.spouse_image           = model.spouse_image;
                entititySetup.marriage_certi_img     = model.marriage_certi_img;
                entititySetup.member_pan_image       = model.member_pan_image;
                entititySetup.spouse_pan_img         = model.spouse_pan_img;
                entititySetup.member_aadhar_img      = model.member_aadhar_img;
                entititySetup.spouse_aadhar_img      = model.spouse_aadhar_img;
                entititySetup.member_passport_img    = model.member_passport_img;
                entititySetup.spouse_passport_img    = model.spouse_passport_img;
                entititySetup.record_date            = DateTime.Today;
                entititySetup.child_info             = model.child_info;
                _entities.Entry(entititySetup).State = EntityState.Added;
                _entities.SaveChanges();
                return(RedirectToAction("Index"));
            }


            return(View(model));
        }