예제 #1
0
    protected void BtnDelete_Click(object sender, EventArgs e)
    {
        try
        {
            int DeleteId = 0;
            if (ViewState["EditID"] != null)
            {
                DeleteId = Convert.ToInt32(ViewState["EditID"]);
            }
            if (DeleteId != 0)
            {
                Entity_TermsConditionMaster.TermsID   = DeleteId;
                Entity_TermsConditionMaster.UserId    = Convert.ToInt32(Session["UserID"]);
                Entity_TermsConditionMaster.LoginDate = DateTime.Now;

                int iDelete = Obj_TermsConditionMaster.DeleteRecord(ref Entity_TermsConditionMaster, out StrError);
                if (iDelete != 0)
                {
                    obj_Comman.ShowPopUpMsg("Record Deleted Successfully..!", this.Page);
                    MakeEmptyForm();
                }
            }
            Entity_TermsConditionMaster = null;
            Obj_TermsConditionMaster    = null;
        }
        catch (Exception ex) { throw new Exception(ex.Message); }
    }
 public ActionResult TermsConditions(TermsCondition model)
 {
     if (ModelState.IsValid)
     {
         var result = userService.AddUpdateTermsConditionsData(model);
     }
     return(View());
 }
예제 #3
0
        public void Terms(Expression <Func <TEntity, object> > expression, IEnumerable <object> values)
        {
            if (expression == null)
            {
                throw new ArgumentNullException(nameof(expression));
            }

            var condition = new TermsCondition <TEntity>(_queryContainerDescriptor, expression, values);

            Must(condition);
        }
예제 #4
0
        public int UpdateRecord(ref TermsCondition Entity_Call, out String StrError)
        {
            int iInsert = 0;

            StrError = string.Empty;

            try
            {
                SqlParameter pAction          = new SqlParameter(TermsCondition._Action, SqlDbType.BigInt);
                SqlParameter PTermsID         = new SqlParameter(TermsCondition._TermsID, SqlDbType.BigInt);
                SqlParameter pTitle           = new SqlParameter(TermsCondition._Title, SqlDbType.NVarChar);
                SqlParameter PTermsConditions = new SqlParameter(TermsCondition._TermsConditions, SqlDbType.NVarChar);
                SqlParameter pCreatedBy       = new SqlParameter(TermsCondition._UserId, SqlDbType.BigInt);
                SqlParameter pCreatedDate     = new SqlParameter(TermsCondition._LoginDate, SqlDbType.DateTime);


                pAction.Value          = 2;
                PTermsID.Value         = Entity_Call.TermsID;
                pTitle.Value           = Entity_Call.Title;
                PTermsConditions.Value = Entity_Call.TermsConditions;
                pCreatedBy.Value       = Entity_Call.UserId;
                pCreatedDate.Value     = Entity_Call.LoginDate;


                SqlParameter[] param = new SqlParameter[] { pAction, PTermsID, pTitle, PTermsConditions, pCreatedBy, pCreatedDate };

                Open(CONNECTION_STRING);
                BeginTransaction();

                iInsert = SQLHelper.ExecuteNonQuery(_Connection, _Transaction, CommandType.StoredProcedure, TermsCondition.SP_TermCondition, param);

                if (iInsert > 0)
                {
                    CommitTransaction();
                }
                else
                {
                    RollBackTransaction();
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            finally
            {
                Close();
            }
            return(iInsert);
        }
예제 #5
0
        public void Create_AccountPage()
        {
            Fname.SendKeys("Testing");
            Lname.SendKeys("Guru");
            Email.SendKeys("*****@*****.**");
            TelePhone.SendKeys("07777777");
            Fax.SendKeys("012345");
            Company.SendKeys("IT_Tech");
            Address1.SendKeys("BFD");
            Address2.SendKeys("city road");
            City.SendKeys("Leeds");



            //DropDown list for Country
            SelectElement DropDown2 = new SelectElement(Country_UK);

            DropDown2.SelectByText("United Kingdom");
            BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            //DropDown list for State/Region
            SelectElement DropDown1 = new SelectElement(RegionState);

            DropDown1.SelectByText("West Yorkshire");
            BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            ZipCode.SendKeys("12345");



            CountryDropDownClick.Click();
            //Country_UK.Click();

            LoginName.SendKeys("tguru2713");
            Password.SendKeys("123qwe");
            ConfirmPass.SendKeys("123qwe");
            Suscribe.Click();
            TermsCondition.Click();
            ContinueBtn1.Click();
            ContinueBtn2.Click();
            //Assert.IsTrue
        }
        public ActionResult TermsCondition()
        {
            TermsCondition _TermsCondition = new TermsCondition();

            _TermsCondition = Mapper.Map <TermsCondition>(_newsService.GetTermsConditionAll(HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))));
            if (_TermsCondition != null)
            {
                string decodedHTML = HttpUtility.HtmlDecode(_TermsCondition.TermsConditionContent);
                if (decodedHTML != null)
                {
                    _TermsCondition.TermsConditionContent = decodedHTML.Replace(GlobalConst.Message.SlashStoragePath, GlobalConst.Message.StoragePath);
                    _TermsCondition.TermsConditionContent = _TermsCondition.TermsConditionContent.Replace("/richtexteditor/", GlobalConst.Extension.http + GlobalConst.ConstantChar.Colon + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.ConstantChar.ForwardSlash + Request.Url.Host.ToLower() + GlobalConst.ConstantChar.Colon + Request.Url.Port + "/richtexteditor/");
                    _TermsCondition.TermsConditionContent = _TermsCondition.TermsConditionContent.Replace("&nbsp;", "");
                }
                else
                {
                    _TermsCondition.TermsConditionContent = decodedHTML;
                }
            }
            return(Json(_TermsCondition));
        }