protected void uiGridViewServices_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditService") { Services objData = new Services(); objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString())); uiTextBoxEnName.Text = objData.EnName; uiTextBoxArName.Text = objData.ArName; uiFCKeditorArDesc.Value = Server.HtmlDecode(objData.ArDescription); uiFCKeditorEnDesc.Value = Server.HtmlDecode(objData.EnDescription); uiDropDownListServiceTypes.SelectedValue = objData.TypeID.ToString(); //uiDropDownListAllCategories.SelectedValue = objData.CategoryID.ToString(); CurrentService = objData; uiPanelViewServices.Visible = false; uiPanelEdit.Visible = true; } else if (e.CommandName == "DeleteService") { Services objData = new Services(); objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString())); objData.MarkAsDeleted(); objData.Save(); BindAll(); } }