Exemple #1
0
        public IActionResult Data([FromBody] GetInTouch data)
        {
            if (ModelState.IsValid)
            {
                db.GetCollection <GetInTouch>("getintouch").ReplaceOne(_ => true, data);
            }

            return(JResult(data));
        }
Exemple #2
0
        protected override void Seed(DatabaseContext context)
        {
            // ########################################################
            Role   oRole   = null;
            User   oUser   = null;
            Gender oGender = null;

            // ########################################################

            // ########################################################
            oGender = new Gender();

            oGender.FA_Name1 = "خانم";
            oGender.Name1    = "Mrs.";
            oGender.FA_Name2 = "خانمِ";
            oGender.Name2    = "Mrs.";
            oGender.Name3    = "Woman";
            oGender.FA_Name3 = "زن";
            oGender.Name4    = "Female";
            oGender.FA_Name4 = "مونث";

            oGender.Code =
                (int)Enums.Genders.Female;

            oGender.Id =
                new System.Guid("21abbd3a-6686-4682-8530-17004a330557");

            context.Genders.Add(oGender);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            oGender = new Gender();

            oGender.FA_Name1 = "آقا";
            oGender.Name1    = "Mr.";
            oGender.FA_Name2 = "آقای";
            oGender.Name2    = "Mr.";
            oGender.FA_Name3 = "مرد";
            oGender.Name3    = "Man";
            oGender.FA_Name4 = "مذکر";
            oGender.Name4    = "Male";

            oGender.Code =
                (int)Enums.Genders.Male;

            oGender.Id =
                new System.Guid("54a3ecae-4601-4e1e-8ab0-798a6991654c");

            context.Genders.Add(oGender);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            oRole = new Role();

            oRole.IsActive = true;
            oRole.Name     = "برنامه نويس";

            oRole.Code =
                (int)Enums.Roles.Programmer;

            oRole.Id =
                new System.Guid("b513f660-377f-4649-8041-063fc4028968");

            context.Roles.Add(oRole);
            // ########################################################

            // ########################################################
            oRole = new Role();

            oRole.IsActive = true;
            oRole.Name     = "مالک پايگاه";

            oRole.Code =
                (int)Enums.Roles.Owner;

            oRole.Id =
                new System.Guid("ae6681a2-c3a6-4f61-961d-5b08f7c62abd");

            context.Roles.Add(oRole);
            // ########################################################

            // ########################################################
            oRole = new Role();

            oRole.IsActive = true;
            oRole.Name     = "مدير ارشد";

            oRole.Code =
                (int)Enums.Roles.Administrator;

            oRole.Id =
                new System.Guid("897d34a5-8bb3-4735-9834-2a195e0cf826");

            context.Roles.Add(oRole);
            // ########################################################

            // ########################################################
            oRole = new Role();

            oRole.IsActive = true;
            oRole.Name     = "مدير ميانی";

            oRole.Code =
                (int)Enums.Roles.Manager;

            oRole.Id =
                new System.Guid("32327c35-beb2-457f-b731-72777a7914e1");

            context.Roles.Add(oRole);
            // ########################################################

            // ########################################################
            oRole = new Role();

            oRole.IsActive = true;
            oRole.Name     = "سرپرست";

            oRole.Code =
                (int)Enums.Roles.Supervisor;

            oRole.Id =
                new System.Guid("2f49b5d8-1c9f-4fb2-b98a-87c912b81fc6");

            context.Roles.Add(oRole);
            // ########################################################

            // ########################################################
            oRole = new Role();

            oRole.IsActive = true;
            oRole.Name     = "کاربر ويژه";
            //کسی که با خرید عضویت کاربر میشود
            oRole.Code =
                (int)Enums.Roles.SpecialUser;

            oRole.Id =
                new System.Guid("82202e76-8ad1-43b9-bdbd-ec360ea26e99");

            context.Roles.Add(oRole);
            // ########################################################

            // ########################################################
            oRole = new Role();

            oRole.IsActive = true;
            oRole.Name     = "کاربر عادی";

            oRole.Code =
                (int)Enums.Roles.User;

            oRole.Id =
                new System.Guid("8d7e5ea8-bb87-4a05-80bc-c832c01c47df");

            context.Roles.Add(oRole);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            oUser = new User();

            oUser.Id =
                new System.Guid("3a1da25b-5b9c-4e51-8f84-6563c9f375a9");

            oUser.RoleId =
                new System.Guid("b513f660-377f-4649-8041-063fc4028968"); // Programmer

            oUser.GenderId =
                new System.Guid("21abbd3a-6686-4682-8530-17004a330557"); //Female

            oUser.IsActive = true;
            //oUser.IsEmailVerified = true;
            oUser.ConfirmNewPassword = "******";
            oUser.Username           = "******";
            oUser.Password           = "******";

            oUser.Email    = "*****@*****.**";
            oUser.FullName = "حمیدرضاشاهیان";

            context.Users.Add(oUser);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ########  ايجاد کاربری ادمین
            // ########################################################
            oUser = new User();

            oUser.Id =
                new System.Guid("3913d77a-adb0-4dcd-88cd-c85c15122bf3");

            oUser.RoleId =
                new System.Guid("897d34a5-8bb3-4735-9834-2a195e0cf826"); // Administrator

            oUser.GenderId =
                new System.Guid("54a3ecae-4601-4e1e-8ab0-798a6991654c"); // Male

            oUser.IsActive = true;
            //oUser.IsEmailVerified = true;
            oUser.ConfirmNewPassword = "******";

            oUser.Username = "******";
            oUser.Password = "******";

            oUser.Email    = "*****@*****.**";
            oUser.FullName = "صادق فروتن";

            context.Users.Add(oUser);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ########  ايجاد کاربری ادمین
            // ########################################################
            oUser = new User();

            oUser.Id =
                new System.Guid("2f84be4b-60ec-4f1c-b434-b2aee3f9e31e");

            oUser.RoleId =
                new System.Guid("897d34a5-8bb3-4735-9834-2a195e0cf826"); // Administrator

            oUser.GenderId =
                new System.Guid("54a3ecae-4601-4e1e-8ab0-798a6991654c"); // Male

            oUser.IsActive = true;
            //oUser.IsEmailVerified = true;

            oUser.Username = "******";
            oUser.Password = "******";

            oUser.Email              = "*****@*****.**";
            oUser.FullName           = "Admin";
            oUser.ConfirmNewPassword = "******";

            context.Users.Add(oUser);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ########  ايجاد کاربری مالک پایگاه
            // ########################################################
            oUser = new User();

            oUser.Id =
                new System.Guid("d06fcb77-fb1d-4fff-98a6-e3f2eb6fd5aa");

            oUser.RoleId =
                new System.Guid("ae6681a2-c3a6-4f61-961d-5b08f7c62abd"); // Owner

            oUser.GenderId =
                new System.Guid("54a3ecae-4601-4e1e-8ab0-798a6991654c"); // Male

            oUser.IsActive = true;
            //oUser.IsEmailVerified = true;

            oUser.Username = "******";
            oUser.Password = "******";

            oUser.Email              = "*****@*****.**";
            oUser.FullName           = "Owner";
            oUser.ConfirmNewPassword = "******";

            context.Users.Add(oUser);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ########  ايجاد کاربری ویژه مرد
            // ########################################################
            oUser = new User();

            oUser.Id =
                new System.Guid("2c6772d1-e3ad-4c21-b487-0f76c0179d88");

            oUser.RoleId =
                new System.Guid("82202e76-8ad1-43b9-bdbd-ec360ea26e99"); // Special User

            oUser.GenderId =
                new System.Guid("54a3ecae-4601-4e1e-8ab0-798a6991654c"); // Male

            oUser.IsActive = true;
            //oUser.IsEmailVerified = true;

            oUser.Username           = "******";
            oUser.Password           = "******";
            oUser.ConfirmNewPassword = "******";

            oUser.Email    = "*****@*****.**";
            oUser.FullName = "Special User";

            context.Users.Add(oUser);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            //// ########################################################
            //// ######## ايجاد 5 کاربر مرد
            //// ########################################################
            //for (int intIndex = 1; intIndex <= 5; intIndex++)
            //{
            //    oUser = new User();

            //    oUser.RoleId =
            //        new System.Guid("8d7e5ea8-bb87-4a05-80bc-c832c01c47df"); //User

            //    oUser.GenderId =
            //        new System.Guid("54a3ecae-4601-4e1e-8ab0-798a6991654c"); // Male

            //    oUser.IsActive = true;
            //    oUser.IsEmailVerified = true;

            //    string strTemp =
            //        string.Format("UserMale{0}", intIndex.ToString().PadLeft(3, '0'));

            //    oUser.Username = strTemp;
            //    oUser.FullName = strTemp;
            //    oUser.Password = "******";

            //    oUser.Email =
            //        string.Format("{0}@GMail.com", strTemp);

            //    context.Users.Add(oUser);
            //}
            //// ########################################################

            //// ########################################################
            //// ######## ايجاد 5 کاربر زن
            //// ########################################################
            //for (int intIndex = 1; intIndex <= 5; intIndex++)
            //{
            //    oUser = new User();

            //    oUser.RoleId =
            //        new System.Guid("8d7e5ea8-bb87-4a05-80bc-c832c01c47df"); // User

            //    oUser.GenderId =
            //        new System.Guid("21abbd3a-6686-4682-8530-17004a330557"); // Female

            //    oUser.IsActive = true;
            //    oUser.IsEmailVerified = true;

            //    string strTemp =
            //        string.Format("UserFemale{0}", intIndex.ToString().PadLeft(3, '0'));

            //    oUser.Username = strTemp;
            //    oUser.FullName = strTemp;
            //    oUser.Password = "******";

            //    oUser.Email =
            //        string.Format("{0}@GMail.com", strTemp);

            //    context.Users.Add(oUser);
            //}
            // ########################################################

            //// ########################################################
            //context.SaveChanges();
            //// ########################################################

            // ########################################################
            // ######## ایجاد انواع سرویس جدید
            // ########################################################
            ServiceType oServiceType = null;

            // ########################################################
            oServiceType =
                new ServiceType();

            oServiceType.Id =
                new System.Guid("90074cc0-0b76-4e14-b69b-cca64f278fab");

            oServiceType.IsActive = true;

            oServiceType.Title = "International Tour";

            oServiceType.FA_Title = "تور خارجی";

            context.ServiceTypes.Add(oServiceType);
            // ########################################################

            // ########################################################
            oServiceType =
                new ServiceType();

            oServiceType.Id =
                new System.Guid("034427c3-9d18-4aae-be86-a1deffa06807");

            oServiceType.IsActive = true;

            oServiceType.Title = "Domestic Tour";

            oServiceType.FA_Title = "تور داخلی";

            context.ServiceTypes.Add(oServiceType);
            // ########################################################

            // ########################################################
            oServiceType =
                new ServiceType();

            oServiceType.Id =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039");

            oServiceType.IsActive = true;

            oServiceType.Title = "Nowrouz Tour";

            oServiceType.FA_Title = "تور نوروز";

            context.ServiceTypes.Add(oServiceType);
            // ########################################################

            // ########################################################
            oServiceType =
                new ServiceType();

            oServiceType.Id =
                new System.Guid("48f771b5-5e66-4c87-b9b2-7dda0b496b38");

            oServiceType.IsActive = true;

            oServiceType.Title = "Viza";

            oServiceType.FA_Title = "ویزا";

            context.ServiceTypes.Add(oServiceType);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ######## ایجاد خدمات خارجی جدید
            // ########################################################
            Service oService = null;

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("2a242c55-e891-42f1-a6cf-e7f8b0c62a67");

            oService.ServiceTypeId =
                new System.Guid("90074cc0-0b76-4e14-b69b-cca64f278fab"); //خارجی

            oService.IsActive = true;

            oService.Title = "Dubai";

            oService.FA_Title = "دبی";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("fd07364b-9bda-42ba-8d5d-4ebad695d890");

            oService.ServiceTypeId =
                new System.Guid("90074cc0-0b76-4e14-b69b-cca64f278fab"); //خارجی

            oService.IsActive = true;

            oService.Title = "Istanbul";

            oService.FA_Title = "استانبول";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("c44c652f-d450-404f-ad72-0025f412c3b2");

            oService.ServiceTypeId =
                new System.Guid("90074cc0-0b76-4e14-b69b-cca64f278fab"); //خارجی

            oService.IsActive = true;

            oService.Title = "Malaysia";

            oService.FA_Title = "مالزی";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("dbbe8eee-8b75-41c7-8fa4-08aafdff2fb0");

            oService.ServiceTypeId =
                new System.Guid("90074cc0-0b76-4e14-b69b-cca64f278fab"); //خارجی

            oService.IsActive = true;

            oService.Title = "Indonesia";

            oService.FA_Title = "اندونزی";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            // ######## ایجاد خدمات داخلی جدید
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("1087a2e7-3229-487e-b54b-619f7e4d6506");

            oService.ServiceTypeId =
                new System.Guid("034427c3-9d18-4aae-be86-a1deffa06807"); //داخلی

            oService.IsActive = true;

            oService.Title = "Kish";

            oService.FA_Title = "کیش";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("79471529-e3ea-4472-a09b-f0f7a93457cb");

            oService.ServiceTypeId =
                new System.Guid("034427c3-9d18-4aae-be86-a1deffa06807"); //داخلی

            oService.IsActive = true;

            oService.Title = "Mashad";

            oService.FA_Title = "مشهد";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            // ######## ایجاد خدمات نوروزی خارجی جدید
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("51c885a3-ddd3-45c7-afd6-4946e70d0c28");

            oService.ServiceTypeId =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039"); //نوروزی خارجی

            oService.IsActive = true;

            oService.Kind = false;

            oService.Title = "Dubai";

            oService.FA_Title = "دبی";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("7fd79972-a021-457d-aa4f-c34839b2695f");

            oService.ServiceTypeId =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039"); //نوروزی خارجی

            oService.IsActive = true;

            oService.Kind = false;

            oService.Title = "Istanbul";

            oService.FA_Title = "استانبول";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("f0d94668-4761-4242-98ce-a75795136ea2");

            oService.ServiceTypeId =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039"); //نوروزی خارجی

            oService.IsActive = true;

            oService.Kind = false;

            oService.Title = "Antalya";

            oService.FA_Title = "آنتالیا";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("3fc5f08b-c290-4b0f-bb0f-f4a673e24e72");

            oService.ServiceTypeId =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039"); //نوروزی خارجی

            oService.IsActive = true;

            oService.Kind = false;

            oService.Title = "Europe";

            oService.FA_Title = "اروپا";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("a8620582-b469-43b5-b16f-b2d240c85e77");

            oService.ServiceTypeId =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039"); //نوروزی خارجی

            oService.IsActive = true;

            oService.Kind = false;

            oService.Title = "Australia";

            oService.FA_Title = "استرالیا";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("20875579-c3de-4147-b98b-743f36b3e6e3");

            oService.ServiceTypeId =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039"); //نوروزی خارجی

            oService.IsActive = true;

            oService.Kind = false;

            oService.Title = "Canada";

            oService.FA_Title = "کانادا";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("b9989b29-9cf8-40d4-9e4c-a061db020991");

            oService.ServiceTypeId =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039"); //نوروزی خارجی

            oService.IsActive = true;

            oService.Kind = false;

            oService.Title = "Malaysia";

            oService.FA_Title = "مالزی";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("1277b64a-d04a-4b9b-a1b7-f87e584a51cc");

            oService.ServiceTypeId =
                new System.Guid("fba0b1eb-0a62-46de-a40e-a42effa8f039"); //نوروزی خارجی

            oService.IsActive = true;

            oService.Kind = false;

            oService.Title = "Brazil-Argentina";

            oService.FA_Title = "برزیل-آرژانتین";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            // ######## ایجاد خدمات نوروزی داخلی جدید
            // ########################################################

            // ########################################################
            // خدماتی اعلام نشده است
            // ########################################################

            // ########################################################

            // ########################################################
            // ######## ایجاد خدمات ویزا جدید
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("3a072318-c948-4006-a72d-99698d1233a4");

            oService.ServiceTypeId =
                new System.Guid("48f771b5-5e66-4c87-b9b2-7dda0b496b38"); //ویزا

            oService.IsActive = true;

            oService.Title = "Schengen";

            oService.FA_Title = "شنگن";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("21b70d2f-1b54-442d-82b6-faac50524f01");

            oService.ServiceTypeId =
                new System.Guid("48f771b5-5e66-4c87-b9b2-7dda0b496b38"); //ویزا

            oService.IsActive = true;

            oService.Title = "America";

            oService.FA_Title = "آمریکا";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("0dd2066f-545b-48d1-8a50-00dbbdae7693");

            oService.ServiceTypeId =
                new System.Guid("48f771b5-5e66-4c87-b9b2-7dda0b496b38"); //ویزا

            oService.IsActive = true;

            oService.Title = "England";

            oService.FA_Title = "انگلستان";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("5de34b0e-0810-4adb-afa6-539366f7c86c");

            oService.ServiceTypeId =
                new System.Guid("48f771b5-5e66-4c87-b9b2-7dda0b496b38"); //ویزا

            oService.IsActive = true;

            oService.Title = "Australia";

            oService.FA_Title = "استرالیا";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("6d115cc3-e8e9-4b69-b941-ef3d819d24f0");

            oService.ServiceTypeId =
                new System.Guid("48f771b5-5e66-4c87-b9b2-7dda0b496b38"); //ویزا

            oService.IsActive = true;

            oService.Title = "Canada";

            oService.FA_Title = "کانادا";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("f2cb247c-c2ee-4abe-87cb-a529af91fcd4");

            oService.ServiceTypeId =
                new System.Guid("48f771b5-5e66-4c87-b9b2-7dda0b496b38"); //ویزا

            oService.IsActive = true;

            oService.Title = "Brazil";

            oService.FA_Title = "بزریل";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            oService =
                new Service();

            oService.Id =
                new System.Guid("9ec95b47-4608-4b56-8205-ef0b72f3d004");

            oService.ServiceTypeId =
                new System.Guid("48f771b5-5e66-4c87-b9b2-7dda0b496b38"); //ویزا

            oService.IsActive = true;

            oService.Title = "Japan";

            oService.FA_Title = "ژاپن";

            oService.Description = "Kinds Of Suitable services";

            oService.FA_Description = "انواع خدمات مناسب";

            context.Services.Add(oService);
            // ########################################################

            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ######## ایجاد اخبار جدید
            // ########################################################
            News oNews = null;

            // ########################################################
            oNews =
                new News();

            oNews.Id =
                new System.Guid("9b938f0e-27aa-4c6d-a369-5205c7de011c");

            oNews.IsActive = true;

            oNews.Title = "News 1";

            oNews.FA_Title = "خبر شماره 1";

            oNews.Summary = "This is a summery about the entity and should be short for showing in a small place";

            oNews.FA_Summary = "این متن بجهت توضیحات و شرح مختصر فیلد مربوطه میباشد لذا میبایست طولانی نباشد";

            oNews.Description = "Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS";

            oNews.FA_Description = "این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد";

            context.Newses.Add(oNews);
            // ########################################################

            // ########################################################
            oNews =
                new News();

            oNews.Id =
                new System.Guid("5225b4b3-96f4-42b3-9b66-efc25baf430b");

            oNews.IsActive = true;

            oNews.Title = "News 2";

            oNews.FA_Title = "خبر شماره 2";

            oNews.Summary = "This is a summery about the entity and should be short for showing in a small place";

            oNews.FA_Summary = "این متن بجهت توضیحات و شرح مختصر فیلد مربوطه میباشد لذا میبایست طولانی نباشد";

            oNews.Description = "Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS";

            oNews.FA_Description = "این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد";

            context.Newses.Add(oNews);
            // ########################################################

            // ########################################################
            oNews =
                new News();

            oNews.Id =
                new System.Guid("5b1e4a62-33c9-4d9c-81fc-09f0734733fd");

            oNews.IsActive = false;

            oNews.Title = "News 3";

            oNews.FA_Title = "خبر شماره 3";

            oNews.Summary = "This is a summery about the entity and should be short for showing in a small place";

            oNews.FA_Summary = "این متن بجهت توضیحات و شرح مختصر فیلد مربوطه میباشد لذا میبایست طولانی نباشد";

            oNews.Description = "Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS";

            oNews.FA_Description = "این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد";

            context.Newses.Add(oNews);
            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ######## ایجاد درخواست جدید
            // ########################################################
            GetInTouch oGetInTouch = null;

            // ########################################################
            oGetInTouch =
                new GetInTouch();

            oGetInTouch.Id =
                new System.Guid("07ef0fee-383b-40f8-bf5f-f5eaf58098dd");

            oGetInTouch.FullName = "حمیدرضاشاهیان";

            oGetInTouch.Email = "*****@*****.**";

            oGetInTouch.Mobile = "(+98)9351406281";

            oGetInTouch.Message = "این متن بجهت توضیحات و شرح مختصر فیلد مربوطه میباشد لذا میبایست طولانی نباشد";

            context.GetInTouches.Add(oGetInTouch);
            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ######## ایجاد تماس با ما جدید
            // ########################################################
            ContactUs oContactUs = null;

            // ########################################################
            oContactUs =
                new ContactUs();

            oContactUs.Id =
                new System.Guid("ae7caefa-aeff-4b9d-9777-44f635e4dcdd");

            oContactUs.Name = "حمیدرضا";

            oContactUs.LastName = "شاهیان";

            oContactUs.City = "Tehran";

            oContactUs.Address = "Beheshti Street";

            oContactUs.Mobile = "09351406281";

            oContactUs.Telephone = "09351406281";

            oContactUs.Email = "*****@*****.**";

            context.ContactUses.Add(oContactUs);
            // ########################################################
            context.SaveChanges();
            // ########################################################

            // ########################################################
            // ######## ایجاد درباره با ما جدید
            // ########################################################
            AboutUs oAboutUs = null;

            // ########################################################
            oAboutUs =
                new AboutUs();

            oAboutUs.Id =
                new System.Guid("8022613f-42ea-4d4e-aa0f-1e386731108e");

            oAboutUs.Title = "Intoduction";

            oAboutUs.FA_Title = "معرفی";

            oAboutUs.Description = "Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS";

            oAboutUs.FA_Description = "این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد";

            context.AboutUses.Add(oAboutUs);
            // ########################################################
            oAboutUs =
                new AboutUs();

            oAboutUs.Id =
                new System.Guid("14dafb27-d67d-443e-a65b-924a6b55fe81");

            oAboutUs.Title = "History";

            oAboutUs.FA_Title = "تاریخچه";

            oAboutUs.Description = "Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS";

            oAboutUs.FA_Description = "این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد این متن بجهت توضیحات و شرح فیلد مربوطه میباشد لذا میبایست طولانی باشد";

            context.AboutUses.Add(oAboutUs);
            // ########################################################
            context.SaveChanges();
            // ########################################################
        }
Exemple #3
0
        public ActionResult pvGetInTouch(GetInTouch g)
        {
            if (ModelState.IsValid)
            {
                string RequestNumber = DateTime.Now.Day.ToString() +
                                       DateTime.Now.Month.ToString() +
                                       DateTime.Now.Year.ToString() +
                                       DateTime.Now.Hour.ToString() +
                                       DateTime.Now.Minute.ToString() +
                                       DateTime.Now.Second.ToString();
                try {
                    //SendEmail("*****@*****.**",
                    //          "*****@*****.**", //Email of customer support employee
                    //          g.Email,
                    //          "Email Received by " + g.Name,
                    //          g.Message,
                    //          "smtp.gmail.com",
                    //          587,
                    //          "sastiService123456",
                    //          RequestNumber,
                    //          true);


                    SendEmail("*****@*****.**",
                              "*****@*****.**", //Email of customer support employee
                              g.Email,
                              "Email Received by " + g.Name,
                              g.Message,
                              "smtp-mail.outlook.com",
                              25,
                              "umair@123",
                              RequestNumber,
                              true);
                    //Entry into the Database

                    STPCustomerSupport cp = new STPCustomerSupport()
                    {
                        Name          = g.Name,
                        ContactNo     = g.ContactNo,
                        Subject       = g.Subject,
                        Email         = g.Email,
                        Message       = g.Message,
                        RequestNumber = RequestNumber
                    };

                    db.STPCustomerSupports.Add(cp);
                    db.SaveChanges();
                    TempData["Message"] = "Emailsuccess";

                    return(RedirectToAction("Index"));
                }
                catch (Exception ex)
                {
                    throw ex;
                    return(RedirectToAction("Index"));
                }
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }