protected void uiButtonSearch_Click(object sender, EventArgs e)
 {
     PackageOptions objData = new PackageOptions();
     objData.SearchPackageOptions(uiTextBoxSearch.Text, 0);
     uiGridViewPackageOptions.DataSource = objData.DefaultView;
     uiGridViewPackageOptions.DataBind();
 }
Ejemplo n.º 2
0
 private void LoadCheckBoxLists()
 {
     PackageOptions objData = new PackageOptions();
     objData.LoadAll();
     uiCheckBoxListPackageOptions.DataSource = objData.DefaultView;
     uiCheckBoxListPackageOptions.DataTextField = "ArName";
     uiCheckBoxListPackageOptions.DataValueField = "PackageOptionID";
     uiCheckBoxListPackageOptions.DataBind();
 }
 protected void uiGridViewPackageOptions_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditPackageOption")
     {
         PackageOptions objData = new PackageOptions();
         objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString()));
         uiTextBoxEnName.Text = objData.EnName;
         uiTextBoxArName.Text = objData.ArName;
         uiTextBoxEnDesc.Text = objData.EnDescription;
         uiTextBoxArDesc.Text = objData.ArDescription;
        // uiDropDownListAllPackages.SelectedValue = objData.PackageID.ToString();
         uiPanelViewPackageOptions.Visible = false;
         uiPanelEdit.Visible = true;
         CurrentPackageOptions = objData;
     }
     else if (e.CommandName == "DeletePackageOption")
     {
         PackageOptions objData = new PackageOptions();
         objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString()));
         objData.MarkAsDeleted();
         objData.Save();
         CurrentPackageOptions = null;
         BindData();
     }
 }
 private void BindData()
 {
     PackageOptions objData = new PackageOptions();
     objData.LoadAll();
     uiGridViewPackageOptions.DataSource = objData.DefaultView;
     uiGridViewPackageOptions.DataBind();
 }
 private void AddNewRecord()
 {
     PackageOptions objData = new PackageOptions();
     objData.AddNew();
     objData.EnName = uiTextBoxEnName.Text;
     objData.ArName = uiTextBoxArName.Text;
     objData.EnDescription = uiTextBoxEnDesc.Text;
     objData.ArDescription = uiTextBoxArDesc.Text;
     //objData.PackageID = Convert.ToInt32(uiDropDownListAllPackages.SelectedValue);
     objData.Save();
 }