Example #1
0
 private void LoadData()
 {
     if (Request.QueryString["GroupID"] != null)
     {
         int             GroupID   = Convert.ToInt32(Request.QueryString["GroupID"]);
         SMSGroupsEntity smsGroups = SMSGroupsFactory.GetSMSGroupsObject(GroupID);
         txtName.Text = smsGroups.Name;
     }
     else
     {
         this.Visible = false;
     }
 }
Example #2
0
    protected void btnCreate_Click(object sender, System.EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }
        SMSGroupsEntity smsGroups = new SMSGroupsEntity();

        smsGroups.Name = txtName.Text;
        if (SMSGroupsFactory.Create(smsGroups))
        {
            General.MakeAlertSucess(lblResult, Resources.AdminText.SavingDataSuccessfuly);
            ClearControls();
        }
        else
        {
            General.MakeAlertError(lblResult, Resources.AdminText.SavingDataFaild);
        }
    }
Example #3
0
    protected void btnUpdate_Click(object sender, System.EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }
        SMSGroupsEntity smsGroups = new SMSGroupsEntity();

        smsGroups.GroupID = Convert.ToInt32(Request.QueryString["GroupID"]);
        smsGroups.Name    = txtName.Text;
        if (SMSGroupsFactory.Update(smsGroups))
        {
            Response.Redirect("default.aspx");
        }
        else
        {
            General.MakeAlertError(lblResult, Resources.AdminText.SavingDataFaild);
        }
    }
Example #4
0
    protected void btnCreate_Click(object sender, System.EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }
        SMSGroupsEntity smsGroups = new SMSGroupsEntity();

        smsGroups.Name = txtName.Text;
        if (SMSGroupsFactory.Create(smsGroups))
        {
            lblResult.CssClass = "operation_done";
            lblResult.Text     = Resources.AdminText.SavingDataSuccessfuly;
            ClearControls();
        }
        else
        {
            lblResult.CssClass = "operation_error";
            lblResult.Text     = Resources.AdminText.SavingDataFaild;
        }
    }