protected void uiButtonCancel_Click(object sender, EventArgs e) { Clearfields(); CurrentPackageOptions = null; uiPanelEdit.Visible = false; uiPanelViewPackageOptions.Visible = true; }
protected void uiButtonUpdate_Click(object sender, EventArgs e) { if (CurrentPackageOptions != null) { UpdateRecord(); } else { AddNewRecord(); } uiPanelEdit.Visible = false; uiPanelViewPackageOptions.Visible = true; BindData(); Clearfields(); CurrentPackageOptions = null; }
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(); } }