Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         RadHelper.SetUpGrid(RadGrid1);
     }
 }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         mvwForm.SetActiveView(viwRead);
         RadHelper.SetUpGrid(RadGrid1);
     }
 }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         mvwForm.SetActiveView(viwRead);
         RadHelper.SetUpGrid(RadGrid1);
         mypFindInvoice.SelectedDate = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         mvwParents.ActiveViewIndex = 0;
         GetCustomerInfo(Request.QueryString["CustomerCode"]);
         RadHelper.SetUpDatePickers(calDateOfBirth);
     }
 }
Esempio n. 5
0
 protected void lnbDelete_Click(object sender, EventArgs e)
 {
     int[] arrayOfID = RadHelper.GetRowIdForDeletion(RadGrid1);
     if (SecurityService.CanDeleteRoles(arrayOfID))
     {
         SecurityService.DeleteRoles(arrayOfID);
         btnCancel_Click(sender, e);
     }
 }
Esempio n. 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     sdsMaster.ConnectionString = ManagementService.GetConnectionString(this.GetCurrentCompanyCode());
     if (!Page.IsPostBack)
     {
         RadHelper.SetUpGrid(grdMaster);
         FillDropDown();
     }
 }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         mvwForm.SetActiveView(viwRead);
         RadHelper.SetUpGrid(grdMaster);
         FillDropDown();
     }
 }
Esempio n. 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     sdsMaster.ConnectionString = ManagementService.GetConnectionString(this.GetCurrentCompanyCode());
     if (!Page.IsPostBack)
     {
         mvwForm.SetActiveView(viwRead);
         RadHelper.SetUpGrid(grdMaster);
     }
 }
Esempio n. 9
0
 protected void lnbDelete_OnClick(object sender, EventArgs e)
 {
     int[] arrayOfID = RadHelper.GetRowIdForDeletion(RadGrid1);
     if (PurchaseOrderService.CanDeleteTerms(arrayOfID))
     {
         PurchaseOrderService.DeleteTerms(arrayOfID);
         btnCancel_OnClick(sender, e);
     }
 }
Esempio n. 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         mvwForm.SetActiveView(viwRead);
         RadHelper.SetUpGrid(RadGrid1);
         dtpFindPurchaseDateFrom.SelectedDate = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
         dtpFindPurchaseDateTo.SelectedDate   = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day);
         FillDropDown();
     }
 }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                mvwForm.SetActiveView(viwRead);
                RadHelper.SetUpGrid(RadGrid1);
                ddlFilter.SelectedIndex = 0;
                FillDropDown();
                Refresh();
            }

            WebFormHelper.InjectSubmitScript(this, "Save this data ?", "Saving, please wait...", btnSave, true);
        }
Esempio n. 12
0
        protected void lnbDelete_Click(object sender, EventArgs e)
        {
            int[] arrayOfID = RadHelper.GetRowIdForDeletion(RadGrid1);

            try
            {
                Array.ForEach(arrayOfID, id => AlertService.DeleteAlert(id));
                ReloadCurrentPage();
            }
            catch (Exception ex)
            {
                WebFormHelper.SetLabelTextWithCssClass(lblStatus, ex.Message, LabelStyleNames.ErrorMessage);
            }
        }
Esempio n. 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RowID = Convert.ToInt32(Request.QueryString["ProspectID"]);
            if (!Page.IsPostBack)
            {
                FillDropDown();
                RadHelper.SetUpGrid(grdMaster);
                dtpDate.SelectedDate = DateTime.Today;
                dtpDate.Enabled      = false;

                var prospect = ProspectService.GetProspect(RowID);
                lblProspectName.Text = String.Format("{0} {1}", prospect.FirstName, prospect.LastName);
            }
        }
Esempio n. 14
0
 protected void lnbDelete_Click(object sender, EventArgs e)
 {
     try
     {
         int[] arrayOfID = RadHelper.GetRowIdForDeletion(RadGrid1);
         if (BankService.CanDeleteBank(arrayOfID))
         {
             BankService.DeleteBank(arrayOfID);
             btnCancel_Click(sender, e);
         }
     }
     catch (Exception ex)
     {
         WebFormHelper.SetLabelTextForException(lblStatus, ex, LabelStyleNames.ErrorMessage);
     }
 }
Esempio n. 15
0
 protected void lnbDelete_Click(object sender, EventArgs e)
 {
     try
     {
         int[] arrayOfID = RadHelper.GetRowIdForDeletion(RadGrid1);
         if (CustomerService.CanDeleteCustomer(arrayOfID))
         {
             CustomerService.DeleteCustomer(arrayOfID);
             btnCancel_Click(sender, e);
         }
     }
     catch (Exception ex)
     {
         WebFormHelper.SetLabelTextWithCssClass(lblStatus, "Cannot delete customer referenced as participants or registered in confirmation letter.", LabelStyleNames.ErrorMessage);
     }
 }
        protected void btnSelect_Click(object sender, EventArgs e)
        {
            //Session["Participants"] = "test";
            int[] customerIDs = RadHelper.GetRowIdForDeletion(RadGrid1);

            Array.ForEach(customerIDs,
                          customerID =>
            {
                int letterID = Convert.ToInt32(Request["LetterID"]);
                ConfirmationLetterService.AddParticipant(letterID, customerID);
            });

            string script = "window.opener.document.getElementById('" + Request["Refresh"] + "').click(); window.close();";

            ClientScript.RegisterStartupScript(this.GetType(), "select", script, true);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ddlBranch.DataSource     = BranchService.GetAllowedBranches(User.Identity.Name);
                ddlBranch.DataTextField  = "Name";
                ddlBranch.DataValueField = "ID";
                ddlBranch.DataBind();
                ddlBranch.SelectedValue = Convert.ToString(HomeBranchID);

                RadHelper.SetUpDatePickers(calDateFrom, calDateTo, calPaymentDateFrom, calPaymentDateTo);
                calDateFrom.SelectedDate        = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
                calPaymentDateFrom.SelectedDate = DateTime.Today.AddYears(-1);
                calPaymentDateTo.SelectedDate   = DateTime.Today;
                calDateTo.SelectedDate          = DateTime.Today;
            }
        }
Esempio n. 18
0
 protected void lnbDelete_Click(object sender, EventArgs e)
 {
     try
     {
         int[] arrayOfID = RadHelper.GetRowIdForDeletion(grdMaster);
         if (SupplierService.CanDeleteSupplier(arrayOfID))
         {
             SupplierService.DeleteSupplier(arrayOfID);
             btnCancel_Click(sender, e);
         }
     }
     catch (Exception ex)
     {
         WebFormHelper.SetLabelTextWithCssClass(lblStatus, ex.Message, LabelStyleNames.ErrorMessage);
         LogService.ErrorException(GetType().FullName, ex);
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                mvwForm.SetActiveView(viwRead);
                FillDropDown();
                RadHelper.SetUpDatePickers(calBirthDateFather,
                                           calBirthDateMother,
                                           calDate,
                                           calDateOfBirth,
                                           calEffectiveDate,
                                           calExpiredDate,
                                           calNextDuesDate);
                WebFormHelper.SetGridViewPageSize(gvwMaster);
            }

            hypLookUpCustomer.Attributes["onclick"] =
                String.Format("showPromptPopUp('PromptCustomer.aspx?', '{0}', 550, 900); ", txtCustomerBarcode.ClientID);
        }
Esempio n. 20
0
        protected void lnbDelete_Click(object sender, EventArgs e)
        {
            int[] arrayOfID = RadHelper.GetRowIdForDeletion(RadGrid1);

            try
            {
                using (var ctx = new VIPDCEntities())
                {
                    ctx.Alerts.Where(row => arrayOfID.Contains(row.ID)).ForEach(
                        alert => ctx.Alerts.Remove(alert));
                    ctx.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                WebFormHelper.SetLabelTextWithCssClass(lblStatus, ex.Message, LabelStyleNames.ErrorMessage);
                //ApplicationLogger.Write(ex);
            }
            Refresh();
        }
 protected void lnbDelete_Click(object sender, EventArgs e)
 {
     int[] arrayOfID = RadHelper.GetRowIdForDeletion(grdMaster);
     ItemService.DeletePriceList(arrayOfID);
     ReloadCurrentPage();
 }