Esempio n. 1
0
 public List <ManageRequests> ListRequest(TaxiAppzDBContext context)
 {
     try
     {
         List <ManageRequests> requestlist = new List <ManageRequests>();
         var listRequest = context.TabRequest.Include(t => t.User).Include(t => t.Driver).ToList().OrderByDescending(t => t.UpdatedAt);
         foreach (var request in listRequest)
         {
             requestlist.Add(new ManageRequests()
             {
                 ID          = request.Id,
                 RequestID   = request.RequestId,
                 DateTime    = request.TripStartTime.ToString(),
                 UserName    = request.User.Firstname + ' ' + request.User.Lastname,
                 Paymentmode = request.PaymentOpt,
                 DriverName  = request.Driver == null ?"":request.Driver.FirstName + ' ' + request.Driver.LastName,
                 TripStatus  = request.IsDriverStarted == true && request.IsDriverArrived == true && request.IsTripStart == false && request.IsCancelled == false ? "Trip not yet started" : (request.IsCancelled == true ? "Trip cancelled" : "Trip completed")
             });
         }
         return(requestlist != null ? requestlist : null);
     }
     catch (Exception ex)
     {
         Extention.insertlog(ex.Message, "Admin", "ListService", context);
         return(null);
     }
 }
Esempio n. 2
0
        public bool SaveReferral(ManageReferral manageReferral, TaxiAppzDBContext content, LoggedInUser loggedIn)
        {
            try
            {
                if (content.TabManageReferral.Any(t => t.IsActive == true && t.ReferralGainAmountPerPerson == manageReferral.ReferralGain_Amount_PerPerson && t.ReferralWorthAmount == manageReferral.ReferralWorth_Amount && t.TripToCompletedToearnRefferalAmount == manageReferral.Trip_to_completed_toearn_refferalAmount && t.TripToCompletedTorefer == manageReferral.Trip_to_completed_torefer))
                {
                    return(true);
                }
                TabManageReferral tabManageReferral = new TabManageReferral();

                tabManageReferral.ReferralGainAmountPerPerson         = manageReferral.ReferralGain_Amount_PerPerson;
                tabManageReferral.ReferralWorthAmount                 = manageReferral.ReferralWorth_Amount;
                tabManageReferral.TripToCompletedTorefer              = manageReferral.Trip_to_completed_toearn_refferalAmount;
                tabManageReferral.TripToCompletedToearnRefferalAmount = manageReferral.Trip_to_completed_torefer;
                tabManageReferral.IsActive  = true;
                tabManageReferral.UpdatedAt = tabManageReferral.CreatedAt = Extention.GetDateTime();
                tabManageReferral.UpdatedBy = tabManageReferral.CreatedBy = loggedIn.UserName;
                content.TabManageReferral.Add(tabManageReferral);
                foreach (var referral in content.TabManageReferral.Where(t => t.IsActive == true).ToList())
                {
                    referral.IsActive  = false;
                    referral.UpdatedAt = Extention.GetDateTime();
                    referral.UpdatedBy = loggedIn.UserName;
                }
                content.SaveChanges();
                return(true);
            }
            catch (Exception ex)
            {
                Extention.insertlog(ex.Message, "Admin", "PromoTransaction", content);
                return(false);
            }
        }
        public Dictionary <QVEnterprise.ActionType, bool> GetPermission(string currentController, int userID)
        {
            // CU_Employee_RoleService ser = new CU_Employee_RoleService();
            CU_Employee_RoleProgramService ser = new CU_Employee_RoleProgramService();

            var                 Permission  = new Dictionary <QVEnterprise.ActionType, bool>();
            CU_PageService      page        = new CU_PageService();
            List <CU_Role_Page> rolePageLst = new List <CU_Role_Page>();
            CU_Role_PageService rolepage    = new CU_Role_PageService();
            int                 progID      = Extention.GeKeyValue <int>("ProgramID");

            var employeeRolesProgram = ser.GetEmployeeRoleProgram(userID, progID);

            foreach (var role in employeeRolesProgram)
            {
                var rolesPage = rolepage.CU_RolepageList.Where(r => r.IdRoleProgram == role.IdRoleProgram && r.IdPage == page.GetCU_PageByPageURL(currentController).ID).FirstOrDefault();
                if (rolesPage != null)
                {
                    rolePageLst.Add(rolesPage);
                }
            }
            //for each action get max permission allawed in logined user roles
            new CU_ActionService().CU_ActionList.ToList().ForEach(delegate(CU_Action i)
            {
                bool hasPermission = rolePageLst.Where(p => p.Permission.Length > i.Order && p.Permission.Substring(i.Order, 1) == "1").Count() > 0;
                Permission.Add((QVEnterprise.ActionType)System.Enum.Parse(typeof(QVEnterprise.ActionType), i.EnName), hasPermission);
            });
            return(Permission);
        }
        public ManageEmailOption GetbyEmailId(TaxiAppzDBContext context, long id)
        {
            try
            {
                ManageEmailOption manageEmailOption = new ManageEmailOption();
                var listEmail = context.TabManageEmail.FirstOrDefault(t => t.ManageEmailid == id);
                if (listEmail != null)
                {
                    manageEmailOption.Id          = listEmail.ManageEmailid;
                    manageEmailOption.EmailTitle  = listEmail.Emailtitle;
                    manageEmailOption.IsActive    = listEmail.IsActive;
                    manageEmailOption.Description = listEmail.Description;

                    List <ManageSMSHint> manageSMSHints = new List <ManageSMSHint>();
                    var listHintSms = context.TabManageEmailHints.Where(t => t.ManageEmailid == listEmail.ManageEmailid).ToList();
                    foreach (var item in listHintSms)
                    {
                        ManageSMSHint sMSHint = new ManageSMSHint();
                        sMSHint.Id      = item.ManageEmailHint;
                        sMSHint.Keyword = item.HintKeyword;
                        sMSHint.HintMsg = item.HintDescription;
                        manageSMSHints.Add(sMSHint);
                    }
                }

                return(manageEmailOption != null ? manageEmailOption : null);
            }
            catch (Exception ex)
            {
                Extention.insertlog(ex.Message, "Admin", "GetbyEmailId", context);
                return(null);
            }
        }
Esempio n. 5
0
        public List <ManagePromo> ManageOption(TaxiAppzDBContext content)
        {
            try
            {
                List <ManagePromo> managePromos = new List <ManagePromo>();
                var promolist = content.TabPromo.Where(t => t.IsDelete == false).ToList();
                if (promolist.Count > 0)
                {
                    foreach (var promo in promolist)
                    {
                        managePromos.Add(new ManagePromo()
                        {
                            PromoID        = promo.Promoid,
                            CoupenCode     = promo.CouponCode,
                            EstimateAmount = promo.PromoEstimateAmount,
                            Value          = promo.PromoValue,
                            Zoneid         = promo.Zoneid,

                            Uses          = promo.PromoUses,
                            RepeatedlyUse = promo.PromoUsersRepeateduse,
                            StartDate     = promo.StartDate,
                            ExpiryDate    = promo.EndDate,
                            IsActive      = promo.IsActive
                        });
                    }
                }
                return(managePromos == null ? null : managePromos);
            }
            catch (Exception ex)
            {
                Extention.insertlog(ex.Message, "Admin", "ManageOption", content);
                return(null);
            }
        }
Esempio n. 6
0
 public List <CancelDriver> DriverList(TaxiAppzDBContext context)
 {
     try
     {
         List <CancelDriver> cancelDrivers = new List <CancelDriver>();
         var driverlist = context.TabDriverCancellation.Where(t => t.IsDelete == false).ToList().OrderByDescending(t => t.UpdatedAt);
         foreach (var drivers in driverlist)
         {
             cancelDrivers.Add(new CancelDriver()
             {
                 Id               = drivers.DriverCancelId,
                 ArrivalStatus    = drivers.Arrivalstatus,
                 CancellationList = drivers.CancellationReasonEnglish,
                 PayingStatus     = drivers.Paymentstatus,
                 Type             = "driver",
                 IsActive         = drivers.IsActive
             });
         }
         return(cancelDrivers);
     }
     catch (Exception ex)
     {
         Extention.insertlog(ex.Message, "Admin", "DriverList", context);
         return(null);
     }
 }
Esempio n. 7
0
        public ManagePromo GetPromoDetails(long promoid, TaxiAppzDBContext content)
        {
            try
            {
                ManagePromo managepromo  = new ManagePromo();
                var         promodetails = content.TabPromo.Where(t => t.Promoid == promoid).FirstOrDefault();
                if (promodetails != null)
                {
                    managepromo.CoupenCode     = promodetails.CouponCode;
                    managepromo.EstimateAmount = promodetails.PromoEstimateAmount;
                    managepromo.Value          = promodetails.PromoValue;
                    managepromo.Zoneid         = promodetails.Zoneid;

                    managepromo.Uses          = promodetails.PromoUses;
                    managepromo.RepeatedlyUse = promodetails.PromoUsersRepeateduse;
                    managepromo.StartDate     = promodetails.StartDate;
                    managepromo.ExpiryDate    = promodetails.EndDate;
                    return(managepromo);
                }
                return(null);
            }
            catch (Exception ex)
            {
                Extention.insertlog(ex.Message, "Admin", "GetPromoDetails", content);
                return(null);
            }
        }
Esempio n. 8
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            string username   = txbx_email.Text.Trim();
            string fname      = txbx_surname.Text.Trim();
            string useremail  = txbx_email.Text.Trim();
            string pass       = txbx_password.Text.Trim();
            string repeadpass = txbx_comfpass.Text.Trim();

            People newperson = new People
            {
                Name     = username,
                Surname  = fname,
                Email    = useremail,
                Password = pass
            };

            if (!CheckInputValidation.CheckInputs(newperson))
            {
                MessageBox.Show("All input fields should be filled.");
                return;
            }

            if (newperson.Password != repeadpass)
            {
                MessageBox.Show("Password and repeat password don't match");
                return;
            }

            newperson.Password = Extention.HashPass(newperson.Password);


            db.Person.Add(newperson);
            db.SaveChanges();
            MessageBox.Show("Added");
        }
        public ActionResult sendAnsweredMessage(int?id, string answeredMessage)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Contact contact = db.Contact.Find(id);

            if (contact == null)
            {
                return(HttpNotFound());
            }
            if (answeredMessage == "")
            {
                return(Json("empty", JsonRequestBehavior.AllowGet));
            }
            contact.Answer     = answeredMessage;
            contact.isAnswered = true;
            Extention.SendMail("CV", contact.Answer, contact.FromEmail);
            db.Entry(contact).State = EntityState.Modified;
            db.SaveChanges();
            if (Request.IsAjaxRequest())
            {
                var emails = db.Contact.OrderByDescending(o => o.Id).Where(w => w.DeletedDate == null).ToList();
                return(PartialView("~/Areas/Admin/Views/Shared/PartialViews/_MessageList.cshtml", emails));
            }

            return(RedirectToAction("Index"));
        }
Esempio n. 10
0
        public void loadParams(string param)
        {
            string stemp = "";

            string[] temp = param.Split('}');
            ABCWHiveSize           = Extention.getParamValueInt(temp, "ABCWHiveSize");
            ABCWPercentScoutInHive = Extention.getParamValueDouble(temp, "ABCWPercentScoutInHive");
            ABCWInitTemperature    = Extention.getParamValueDouble(temp, "ABCWInitTemperature");
            ABCWColdCoeff          = Extention.getParamValueDouble(temp, "ABCWColdCoeff");
            ABCWCountIteration     = Extention.getParamValueInt(temp, "ABCWCountIteration");
            stemp = Extention.getParamValueString(temp, "ABCWTypeSelection");
            switch (stemp)
            {
            case "Roulete": ABCWTypeSelection = Type_Selection.улетка; break;

            case "BinaryTournament": ABCWTypeSelection = Type_Selection.Бинарный_турнир; break;

            case "Random": ABCWTypeSelection = Type_Selection.Случайный_отбор; break;

            case "E;ite": ABCWTypeSelection = Type_Selection.Элитный_отбор; break;

            default: ABCWTypeSelection = Type_Selection.улетка; break;
            }

            ABCWFirstBorder   = Extention.getParamValueDouble(temp, "ABCWFirstBorder");
            ABCWFirstRepeate  = Extention.getParamValueInt(temp, "ABCWFirstRepeate");
            ABCWSecondBorder  = Extention.getParamValueDouble(temp, "ABCWSecondBorder");
            ABCWSecondRepeate = Extention.getParamValueInt(temp, "ABCWSecondRepeate");
            ABCWFirdBorder    = Extention.getParamValueDouble(temp, "ABCWFirdBorder");
            ABCWFirdRepeate   = Extention.getParamValueInt(temp, "ABCWFirdRepeate");
        }
Esempio n. 11
0
 public List <ManageUserComplaint> ListUserComplaintTemplate(TaxiAppzDBContext context)
 {
     try
     {
         var complaintlist = context.TabUserComplaint.Where(t => t.IsDelete == false).ToList();
         List <ManageUserComplaint> manageUserlist = new List <ManageUserComplaint>();
         if (complaintlist.Count > 0)
         {
             foreach (var complaint in complaintlist)
             {
                 manageUserlist.Add(new ManageUserComplaint()
                 {
                     UserComplaintType  = complaint.UserComplaintType,
                     UserComplaintTitle = complaint.UserComplaintTitle,
                     IsActive           = complaint.IsActive
                 });
             }
             return(manageUserlist);
         }
         return(null);
     }
     catch (Exception ex)
     {
         Extention.insertlog(ex.Message, "Admin", "ListUserComplaintTemplate", context);
         return(null);
     }
 }
Esempio n. 12
0
 public override void loadParams(string param)
 {
     base.loadParams(param);
     string[] temp = param.Split('}');
     MACOCountElite    = Extention.getParamValueInt(temp, "MACOCountElite");
     MACOCountExtremum = Extention.getParamValueInt(temp, "MACOCountExtremum");
 }
Esempio n. 13
0
 public List <ManageFAQList> ListFAQ(TaxiAppzDBContext context)
 {
     try
     {
         List <ManageFAQList> manageFAQ = new List <ManageFAQList>();
         var listFAQ = context.TabFaq.Where(t => t.IsDelete == false).ToList().OrderByDescending(t => t.UpdatedAt);
         foreach (var FAQ in listFAQ)
         {
             manageFAQ.Add(new ManageFAQList()
             {
                 Complaint_Type = FAQ.ComplaintType,
                 FAQ_Answer     = FAQ.FaqAnswer,
                 FAQ_Question   = FAQ.FaqQuestion,
                 Id             = FAQ.Faqid,
                 IsActive       = FAQ.IsActive,
                 Servicelocid   = FAQ.Servicelocid
             });
         }
         return(manageFAQ != null ? manageFAQ : null);
     }
     catch (Exception ex)
     {
         Extention.insertlog(ex.Message, "Admin", "ListFAQ", context);
         return(null);
     }
 }
Esempio n. 14
0
 public List <DrivertoUser> ListDriverRating(TaxiAppzDBContext context)
 {
     try
     {
         List <DrivertoUser> drivertoUsers = new List <DrivertoUser>();
         var driverList = context.TabRequestRating.Include(t => t.User).Include(t => t.Driver).ToList();
         foreach (var driver in driverList)
         {
             drivertoUsers.Add(new DrivertoUser()
             {
                 Id         = driver.RatingId,
                 Comment    = driver.Comments,
                 DriverName = driver.Driver == null ? "" : driver.Driver.FirstName + ' ' + driver.Driver.LastName,
                 UserName   = driver.User.Firstname + ' ' + driver.User.Lastname,
                 Rating     = driver.UserRating,
                 RequestID  = driver.RequestId
             });
         }
         return(drivertoUsers);
     }
     catch (Exception ex)
     {
         Extention.insertlog(ex.Message, "Admin", "ListDriverRating", context);
         return(null);
     }
 }
Esempio n. 15
0
 public override void loadParams(string param)
 {
     base.loadParams(param);
     string[] temp = param.Split('}');
     GENCHOSendEach = Extention.getParamValueInt(temp, "GENCHOSendEach");
     GENCHOGetEach  = Extention.getParamValueInt(temp, "GENCHOGetEach");
 }
Esempio n. 16
0
        public bool SaveTripSettings(TripSettings tripSettings, TaxiAppzDBContext content, LoggedInUser loggedIn)
        {
            var exist = content.TabTripSettings.FirstOrDefault(t => t.IsActive == false && t.TripSettingsId == tripSettings.Id);

            if (exist == null)
            {
                TabTripSettings tabTripSettings = new TabTripSettings();
                tabTripSettings.TripSettingsQuestion = tripSettings.TripSettingQuestion;
                tabTripSettings.TripSettingsAnswer   = tripSettings.TripSettingAnswer;
                tabTripSettings.IsActive             = true;
                tabTripSettings.UpdatedAt            = tabTripSettings.CreatedAt = Extention.GetDateTime();
                tabTripSettings.UpdatedBy            = tabTripSettings.CreatedBy = loggedIn.UserName;
                content.TabTripSettings.Add(tabTripSettings);
                content.SaveChanges();
                return(true);
            }
            else
            {
                exist.TripSettingsQuestion = tripSettings.TripSettingQuestion;
                exist.TripSettingsAnswer   = tripSettings.TripSettingAnswer;
                exist.UpdatedAt            = Extention.GetDateTime();
                exist.UpdatedBy            = loggedIn.UserName;
                content.TabTripSettings.Update(exist);
                content.SaveChanges();
                return(true);
            }
        }
Esempio n. 17
0
 protected void AddExtention(Extention extention)
 {
     if (!_extentions.Contains(extention))
     {
         _extentions.Add(extention);
     }
 }
Esempio n. 18
0
        public TripSettings GetTripSettings(TaxiAppzDBContext context)
        {
            try
            {
                TripSettings trips           = new TripSettings();
                var          listTripSetting = context.TabTripSettings.Where(t => t.IsActive == true).ToList();


                trips.AssignMethod        = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 1).TripSettingsAnswer;
                trips.RequestWaitSecond   = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 2).TripSettingsAnswer;
                trips.CaptainGetTrips     = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 3).TripSettingsAnswer;
                trips.CaptainsRatingLimit = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 4).TripSettingsAnswer;
                trips.CertainMinutes      = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 5).TripSettingsAnswer;
                trips.DispatchRequest     = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 6).TripSettingsAnswer;
                trips.LocationChangeLimit = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 7).TripSettingsAnswer;
                trips.PickupLocationUnits = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 8).TripSettingsAnswer;
                trips.RequestInKm         = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 9).TripSettingsAnswer;
                trips.ScheduleTripsTime   = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 10).TripSettingsAnswer;
                trips.RewardPoints        = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 11).TripSettingsAnswer;
                trips.TransferTripAmount  = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 12).TripSettingsAnswer;
                trips.TripGraceTime       = listTripSetting.FirstOrDefault(t => t.TripSettingsId == 13).TripSettingsAnswer;

                return(trips != null ? trips : null);
            }
            catch (Exception ex)
            {
                Extention.insertlog(ex.Message, "Admin", System.Reflection.MethodBase.GetCurrentMethod().Name, context);
                return(null);
            }
        }
Esempio n. 19
0
 public List <CurrencyList> ListCurrency(TaxiAppzDBContext context)
 {
     try
     {
         List <CurrencyList> currencylist = new List <CurrencyList>();
         var currencyList = context.TabCommonCurrency.Include(t => t.Currencies).Where(t => t.IsDeleted == 0).ToList().OrderByDescending(t => t.UpdatedAt);
         foreach (var currency in currencyList)
         {
             currencylist.Add(new CurrencyList()
             {
                 IsActive     = currency.IsActive == 1 ? true : false,
                 CurrencyId   = currency.Currencyid,
                 CurrencyName = currency.Currencyname,
                 StandardName = currency.Currencies.Currency,
                 Symbol       = currency.CurrencySymbol
             });;
         }
         return(currencylist);
     }
     catch (Exception ex)
     {
         Extention.insertlog(ex.Message, "Admin", "ListCurrency", context);
         return(null);
     }
 }
Esempio n. 20
0
 public List <PromoTransaction> PromoTransaction(TaxiAppzDBContext content)
 {
     try
     {
         List <PromoTransaction> promoTransactions = new List <PromoTransaction>();
         var promolist = content.TabPromo.Where(t => t.IsDelete == false).ToList();
         if (promolist.Count > 0)
         {
             foreach (var promo in promolist)
             {
                 promoTransactions.Add(new PromoTransaction()
                 {
                     PromoID    = promo.Promoid,
                     CoupenCode = promo.CouponCode,
                     Value      = promo.PromoValue,
                     Type       = promo.PromoType,
                     Uses       = promo.PromoUses
                 });
             }
         }
         return(promoTransactions == null ? null : promoTransactions);
     }
     catch (Exception ex)
     {
         Extention.insertlog(ex.Message, "Admin", "PromoTransaction", content);
         return(null);
     }
 }
Esempio n. 21
0
 public ActionResult ContactMe([Bind(Include = "UserName,FromEmail,Subject,Message,SendingDate")] Contact NewContact)
 { //todo
     if (NewContact.UserName == null || NewContact.FromEmail == null || NewContact.Message == null)
     {
         TempData["FillContactInputs"] = "Please, Fill all Inputs";
         return(RedirectToAction("Contact", "Home"));
     }
     else
     {
         var email = db.Person.FirstOrDefault();
         var count = 1;
         var s     = "";
         foreach (var item in db.Contact.Where(w => w.isRead == false).ToList())
         {
             count++;
         }
         if (count > 1)
         {
             s = "s";
         }
         NewContact.SendingDate = DateTime.Now;
         db.Contact.Add(NewContact);
         Extention.SendMail("Message", "You have " + count + " new Email" + s + "", email.Email);
         db.SaveChanges();
         return(RedirectToAction("Index", db.Person.FirstOrDefault()));
     }
 }
Esempio n. 22
0
 public List <ServiceListModel> ListService(TaxiAppzDBContext context)
 {
     try
     {
         List <ServiceListModel> rolelist = new List <ServiceListModel>();
         var listService = context.TabServicelocation.Include(t => t.Country).Include(t => t.Timezone).Include(t => t.Currency).Where(t => t.IsDeleted == 0).ToList().OrderByDescending(t => t.UpdatedAt);
         foreach (var service in listService)
         {
             rolelist.Add(new ServiceListModel()
             {
                 Country        = service.Country.Name,
                 CurrencyCode   = service.Country.Currency,
                 CurrencySymbol = service.Currency.CurrencySymbol,
                 ServiceId      = service.Servicelocid,
                 ServiceName    = service.Name,
                 TimeZone       = service.Timezone.Zonedescription
             });
         }
         return(rolelist != null ? rolelist : null);
     }
     catch (Exception ex)
     {
         Extention.insertlog(ex.Message, "Admin", "ListService", context);
         return(null);
     }
 }
Esempio n. 23
0
        public bool UserInsert(ref Article article, List <ArticleAuthors> articleAuthorses,
                               HttpPostedFileBase abstractFileId,
                               HttpPostedFileBase orginalFileId, List <DiscountType> transactionDiscountAttaches, string callbackurl,
                               FormStructure formModel)
        {
            try
            {
                ArticleBO articleBo = new ArticleBO();
                ModelView.InFormEntitiyList <RefereeCartable> keyValuePairs = new ModelView.InFormEntitiyList <RefereeCartable>();
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                FileManagerConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                FormGeneratorConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                if (!articleBo.UserInsert(ConnectionHandler, FileManagerConnection,
                                          FormGeneratorConnection, article, articleAuthorses, abstractFileId, orginalFileId,
                                          formModel))
                {
                    return(false);
                }

                if (!articleBo.SendArticle(ConnectionHandler, FileManagerConnection, article, keyValuePairs))
                {
                    return(false);
                }

                article = new ArticleBO().Get(ConnectionHandler, article.Id);
                bool articlePaymnet = new ArticleBO().ArticlePaymnet(ConnectionHandler, PaymentConnection,
                                                                     ref article, transactionDiscountAttaches, callbackurl + article.Id);
                if (!articlePaymnet)
                {
                    throw new Exception(string.Format(Resources.Congress.ErrorInPayArticleAmount,
                                                      Extention.GetAtricleTitle(article.CongressId)));
                }

                ConnectionHandler.CommitTransaction();
                FileManagerConnection.CommitTransaction();
                PaymentConnection.CommitTransaction();
                FormGeneratorConnection.CommitTransaction();
                return(true);
            }
            catch (KnownException ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                PaymentConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                PaymentConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
        }
Esempio n. 24
0
 public virtual void loadParams(string param)
 {
     string[] temp = param.Split('}');
     ABCDSCountScout       = Extention.getParamValueInt(temp, "ABCDSCountScout");
     ABCDSCountWorkers     = Extention.getParamValueInt(temp, "ABCDSCountWorkers");
     ABCDSCountIter        = Extention.getParamValueInt(temp, "ABCDSIter");
     ABCDS_CountOfBestBase = Extention.getParamValueInt(temp, "ABCDS_CointOfBestBase");
 }
Esempio n. 25
0
 public override void loadParams(string param)
 {
     base.loadParams(param);
     string[] temp = param.Split('}');
     PSOBacteryHOCountSend   = Extention.getParamValueInt(temp, "PSOBacteryHOCountSend");
     PSOBacteryHOCountGet    = Extention.getParamValueInt(temp, "PSOBacteryHOCountGet");
     PSOBacteryHOCountChange = Extention.getParamValueInt(temp, "PSOBacteryHOCountChange");
 }
Esempio n. 26
0
 public void loadParams(string param)
 {
     string[] temp = param.Split('}');
     Количество_итераций    = Extention.getParamValueInt(temp, "Iter");
     Количество_всех_частиц = Extention.getParamValueInt(temp, "AllParts");
     Мат_ожидание           = Extention.getParamValueInt(temp, "MathExpected");
     Отклонение             = Extention.getParamValueInt(temp, "Deviation");
 }
Esempio n. 27
0
 public void loadParams(string param)
 {
     string[] temp = param.Split('}');
     Количество_итераций    = Extention.getParamValueInt(temp, "SSOIter");
     Количество_всех_частиц = Extention.getParamValueInt(temp, "SSOAllParts");
     Количество_лок_лидеров = Extention.getParamValueInt(temp, "SSOLocalLeaders");
     Количество_бесц_част   = Extention.getParamValueInt(temp, "SSOAimlessParts");
 }
Esempio n. 28
0
        public virtual void loadParams(string param)
        {
            string[] temp = param.Split('}');

            PSOSCCountIteration = Extention.getParamValueInt(temp, "PSOSCCountIteration");
            PSOSCPopulationSize = Extention.getParamValueInt(temp, "PSOSCPopulationSize");
            PSOSCC1             = Extention.getParamValueDouble(temp, "PSOSCC1");
            PSOSCC2             = Extention.getParamValueDouble(temp, "PSOSCC2");
        }
Esempio n. 29
0
 public void loadParams(string param)
 {
     string[] temp = param.Split('}');
     CuckooCountIterate   = Extention.getParamValueInt(temp, "CuckooCountIterate");
     CuckooPopulationSize = Extention.getParamValueInt(temp, "CuckooPopulationSize");
     CuckooWorse          = Extention.getParamValueInt(temp, "CuckooWorse");
     CuckooLifeChance     = Extention.getParamValueDouble(temp, "CuckooLifeChance");
     CuckooBeta           = Extention.getParamValueDouble(temp, "CuckooBeta");
 }
Esempio n. 30
0
        public void loadParams(string param)
        {
            string[] temp = param.Split('}');

            BFOCountSolution = Extention.getParamValueInt(temp, "BFOCountSolution");

            BFOCountIteration = Extention.getParamValueInt(temp, "BFOCountIteration");

            //  throw (new NotImplementedException());
        }