Exemplo n.º 1
0
 private void InsertUserSchemeTrans()
 {
     try
     {
         int valid = 0;
         valid = UserSchemeMasterController.GetTransactionBySchemeIDAndUserType(UserSchemeID, Convert.ToInt64(ddlUsers.SelectedValue)).Count;
         if (valid > 0)
         {
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "err_msg", "MessageBox('Error','Transaction of same UserType Already Exists.');", true);
         }
         else
         {
             UserSchemeTransaction objscmTran = new UserSchemeTransaction();
             objscmTran.userSchemeId           = UserSchemeID;
             objscmTran.joiningFee             = Convert.ToDecimal(txtJFee.Text);
             objscmTran.adminFee               = Convert.ToDecimal(txtAFee.Text);
             objscmTran.membershipFee          = Convert.ToDecimal(txtMmbrFee.Text);
             objscmTran.personalTrainingPack   = Convert.ToDecimal(txtPTFee.Text);
             objscmTran.serviceTaxInPercentage = Convert.ToDecimal(txtSTax.Text);
             objscmTran.totalAmount            = Convert.ToDecimal(txtTAmt.Text);
             objscmTran.userTypeId             = Convert.ToInt32(ddlUsers.SelectedValue);
             objscmTran = new UserSchemeMasterController().InsertUserSchemeTransaction(objscmTran);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
        private void BindUserSchemeDetails()
        {
            try
            {
                PanelTransactionVisibility(true, false);
                #region UserScheme
                SchemeMaster objUserScheme = UserSchemeMasterController.GetUserSchemeMasterByID(UserSchemeID);
                ddlPckgName.SelectedValue = Convert.ToString(objUserScheme.PackageId);
                txtSchemeName.Text        = objUserScheme.SchemeName;
                lblSchJoin.Text           = "Joining Fee:- " + Convert.ToString(objUserScheme.JoiningFee);
                lblSchAdmin.Text          = "Admin Fee:- " + Convert.ToString(objUserScheme.AdminFee);
                lblSchMem.Text            = "Membership Fee:- " + Convert.ToString(objUserScheme.MemberFee);
                lblSchPers.Text           = "Personal Traning Fee:- " + Convert.ToString(objUserScheme.PTFee);
                lblSchService.Text        = "ServiceTax:- " + Convert.ToString(objUserScheme.SGST);
                lblSchService.Text        = "ServiceTax:- " + Convert.ToString(objUserScheme.CGST);
                #endregion

                #region Packages
                PackageMaster objPckMst = UserSchemeMasterController.GetPackagesByID(Convert.ToInt64(ddlPckgName.SelectedValue));
                //lblAdminFee.Text = "Admin Fee:- " + Convert.ToString(objPckMst.adminFee);
                //lblJoinFee.Text = "Joining Fee:- " + Convert.ToString(objPckMst.joiningFee);
                //lblMembrFee.Text = "Membership Fee:- " + Convert.ToString(objPckMst.membershipFee);
                //lblPrsnltrngFee.Text = "Personal Traning Fee:- " + Convert.ToString(objPckMst.personalTrainingPack);
                //lblSrvcTax.Text = "ServiceTax:- " + Convert.ToString(objPckMst.serviceTaxInPercentage);
                #endregion
                BindTransGrid();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 3
0
 private void BindTransGrid()
 {
     try
     {
         grdUserSchemeTrans.DataSource = UserSchemeMasterController.GetTransactionBySchemeID(UserSchemeID);
         grdUserSchemeTrans.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 4
0
 private void BindGrid()
 {
     try
     {
         grdUserScheme.DataSource = UserSchemeMasterController.GetUserSchemeMaster(txtSearchText.Text, txtSearchSchmName.Text, SortField, SortDir, LoginUser.ClubId);
         grdUserScheme.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 5
0
        private void BindUserSchemeTransValues()
        {
            PanelTransactionVisibility(false, true);
            UserSchemeTransaction objUserSchTrans = UserSchemeMasterController.GetUserSchemeTransactionByID(UserSchemeTransID);

            ddlUsers.SelectedValue = Convert.ToString(objUserSchTrans.userTypeId);
            txtJFee.Text           = Convert.ToString(objUserSchTrans.joiningFee);
            txtAFee.Text           = Convert.ToString(objUserSchTrans.adminFee);
            txtMmbrFee.Text        = Convert.ToString(objUserSchTrans.membershipFee);
            txtPTFee.Text          = Convert.ToString(objUserSchTrans.personalTrainingPack);
            txtSTax.Text           = Convert.ToString(objUserSchTrans.serviceTaxInPercentage);
            txtTAmt.Text           = Convert.ToString(objUserSchTrans.totalAmount);
        }
Exemplo n.º 6
0
 private void BindUserType()
 {
     try
     {
         ddlUsers.DataSource     = UserSchemeMasterController.GetUserTypes();
         ddlUsers.DataTextField  = "type";
         ddlUsers.DataValueField = "ID";
         ddlUsers.DataBind();
         ddlUsers.Items.Insert(0, new ListItem("Select Users", "0"));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 7
0
 protected void ddlPackageS_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlPackageS.SelectedIndex == 0)
     {
         lblAdmin.Text = lblJoin.Text = lblMember.Text = lblPTP.Text = lblSerTax.Text = "";
     }
     else
     {
         PackageMaster objPckg = UserSchemeMasterController.GetPackagesByID(Convert.ToInt64(ddlPackageS.SelectedValue));
         //lblJoin.Text = Convert.ToString(objPckg.joiningFee);
         //lblAdmin.Text = Convert.ToString(objPckg.adminFee);
         //lblMember.Text = Convert.ToString(objPckg.membershipFee);
         //lblPTP.Text = Convert.ToString(objPckg.personalTrainingPack);
         //lblSerTax.Text = Convert.ToString(objPckg.serviceTaxInPercentage);
     }
 }
Exemplo n.º 8
0
 private void BindUserSchemeValues()
 {
     try
     {
         SchemeMaster objUserScheme = UserSchemeMasterController.GetUserSchemeMasterByID(UserSchemeID);
         ddlPackageS.SelectedValue  = objUserScheme.PackageId.ToString();
         txtUserschemeName.Text     = objUserScheme.SchemeName;
         txtJoinFee.Text            = Convert.ToString(objUserScheme.JoiningFee);
         txtMemFee.Text             = Convert.ToString(objUserScheme.MemberFee);
         txtAdminFee.Text           = Convert.ToString(objUserScheme.AdminFee);
         txtPersTraining.Text       = Convert.ToString(objUserScheme.PTFee);
         txtService.Text            = Convert.ToString(objUserScheme.SGST);
         txtService.Text            = Convert.ToString(objUserScheme.CGST);
         txtTotAmt.Text             = Convert.ToString(objUserScheme.TotalAmount);
         txtAdditionalExpense.Text  = Convert.ToString(objUserScheme.AdditionalExpense);
         txtDwnGrdDays.Text         = Convert.ToString(objUserScheme.DowngradeDays);
         txtUpgrdDays.Text          = Convert.ToString(objUserScheme.UpgradeDays);
         txtStrDate.Text            = ((DateTime)objUserScheme.StartDate).ToString("dd/MM/yyyy");
         txtEndDate.Text            = ((DateTime)objUserScheme.EndDate).ToString("dd/MM/yyyy");
         ddlStartTime.SelectedValue = Convert.ToString(objUserScheme.StartTime);
         ddlEndTime.SelectedValue   = Convert.ToString(objUserScheme.EndTime);
         if (chkAllowCancelation.Checked)
         {
             pnlCancellation.Visible = true;
             txtCanclDays.Text       = Convert.ToString(objUserScheme.CancelDays);
             CancellationMaster objCancel = UserSchemeMasterController.GetCancellationBySchemeId(UserSchemeID);
             chkJoining.Checked    = (bool)objCancel.joiningFee;
             chkAdmin.Checked      = (bool)objCancel.adminFee;
             chkMembership.Checked = (bool)objCancel.membershipFee;
             chkPTP.Checked        = (bool)objCancel.personalTrainingPack;
         }
         else
         {
             pnlCancellation.Visible = false;
             txtCanclDays.Text       = "";
             chkJoining.Checked      = chkAdmin.Checked = chkMembership.Checked = chkPTP.Checked = false;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 9
0
 private void UpdateUserSchemeTrans()
 {
     try
     {
         UserSchemeTransaction objUserSchTrans = UserSchemeMasterController.GetUserSchemeTransactionByID(UserSchemeTransID);
         objUserSchTrans.userSchemeId           = UserSchemeID;
         objUserSchTrans.joiningFee             = Convert.ToDecimal(txtJFee.Text);
         objUserSchTrans.adminFee               = Convert.ToDecimal(txtAFee.Text);
         objUserSchTrans.membershipFee          = Convert.ToDecimal(txtMmbrFee.Text);
         objUserSchTrans.personalTrainingPack   = Convert.ToDecimal(txtPTFee.Text);
         objUserSchTrans.serviceTaxInPercentage = Convert.ToDecimal(txtSTax.Text);
         objUserSchTrans.totalAmount            = Convert.ToDecimal(txtTAmt.Text);
         objUserSchTrans.userTypeId             = Convert.ToInt32(ddlUsers.SelectedValue);
         objUserSchTrans = new UserSchemeMasterController().UpdateUserSchemeTransaction(objUserSchTrans);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 10
0
        private void BindPackages()
        {
            try
            {
                ClubId = LoginUser.ClubId;
                ddlPackageS.DataSource     = UserSchemeMasterController.GetPackages(ClubId);
                ddlPackageS.DataTextField  = "packageName";
                ddlPackageS.DataValueField = "ID";
                ddlPackageS.DataBind();
                ddlPackageS.Items.Insert(0, new ListItem("Select Packages", "0"));

                ddlPckgName.DataSource     = UserSchemeMasterController.GetPackages(ClubId);
                ddlPckgName.DataTextField  = "packageName";
                ddlPckgName.DataValueField = "ID";
                ddlPckgName.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 11
0
        private void UpdateUserScheme()
        {
            try
            {
                SchemeMaster objUserScheme = UserSchemeMasterController.GetUserSchemeMasterByID(UserSchemeID);
                objUserScheme.PackageId         = Convert.ToInt64(ddlPackageS.SelectedValue);
                objUserScheme.SchemeName        = txtUserschemeName.Text;
                objUserScheme.JoiningFee        = Convert.ToDecimal(txtJoinFee.Text);
                objUserScheme.AdminFee          = Convert.ToDecimal(txtAdminFee.Text);
                objUserScheme.MemberFee         = Convert.ToDecimal(txtMemFee.Text);
                objUserScheme.PTFee             = Convert.ToDecimal(txtPersTraining.Text);
                objUserScheme.SGST              = Convert.ToDecimal(txtService.Text);
                objUserScheme.CGST              = Convert.ToDecimal(txtService.Text);
                objUserScheme.TotalAmount       = Convert.ToDecimal(txtTotAmt.Text);
                objUserScheme.AdditionalExpense = Convert.ToDecimal(0);
                objUserScheme.StartDate         = UtillController.ConvertDateTime(txtStrDate.Text);
                objUserScheme.EndDate           = UtillController.ConvertDateTime(txtEndDate.Text);
                objUserScheme.StartTime         = ddlStartTime.SelectedValue;
                objUserScheme.EndTime           = ddlEndTime.SelectedValue;
                if (txtCanclDays.Text.Equals(""))
                {
                    objUserScheme.CancelDays = null;
                }
                else
                {
                    objUserScheme.CancelDays = Convert.ToInt32(txtCanclDays.Text);
                }
                objUserScheme.DowngradeDays = Convert.ToInt32(txtDwnGrdDays.Text);
                objUserScheme.UpgradeDays   = Convert.ToInt32(txtUpgrdDays.Text);
                new UserSchemeMasterController().UpdateUserScheme(objUserScheme);

                if (chkAllowCancelation.Checked)
                {
                    CancellationMaster objCancel = UserSchemeMasterController.GetCancellationBySchemeId(UserSchemeID);
                    if (objCancel != null)
                    {
                        objCancel.schemeId             = UserSchemeID;
                        objCancel.joiningFee           = chkJoining.Checked;
                        objCancel.adminFee             = chkAdmin.Checked;
                        objCancel.membershipFee        = chkMembership.Checked;
                        objCancel.personalTrainingPack = chkPTP.Checked;
                        new UserSchemeMasterController().UpdateCancelMaster(objCancel);
                    }
                    else
                    {
                        objCancel                      = new CancellationMaster();
                        objCancel.schemeId             = UserSchemeID;
                        objCancel.joiningFee           = chkJoining.Checked;
                        objCancel.adminFee             = chkAdmin.Checked;
                        objCancel.membershipFee        = chkMembership.Checked;
                        objCancel.personalTrainingPack = chkPTP.Checked;
                        new UserSchemeMasterController().InsertCancelMaster(objCancel);
                    }
                }
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "succ_msg", "MessageBox('Success','Data Updated');", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }