protected void uiButtonUpdate_Click(object sender, EventArgs e)
        {
            if (CurrentServiceType != null)
            {
                ServiceTypes objData = CurrentServiceType;
                objData.EnName = uiTextBoxEnName.Text;
                objData.ArName = uiTextBoxArName.Text;
                objData.Save();
            }
            else
            {
                ServiceTypes objData = new ServiceTypes ();
                objData.AddNew();
                objData.EnName = uiTextBoxEnName.Text;
                objData.ArName = uiTextBoxArName.Text;
                objData.Save();
            }

            uiPanelEdit.Visible = false;
            uiPanelViewServiceTypes.Visible = true;
            BindData();
            CurrentServiceType = null;
            Clearfields();
        }
 protected void uiGridViewServiceTypes_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditServiceType")
     {
         ServiceTypes objData = new ServiceTypes();
         objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString()));
         uiTextBoxEnName.Text = objData.EnName;
         uiTextBoxArName.Text = objData.ArName;
         CurrentServiceType = objData;
         uiPanelViewServiceTypes.Visible = false;
         uiPanelEdit.Visible = true;
     }
     else if (e.CommandName == "DeleteServiceType")
     {
         ServiceTypes objData = new ServiceTypes();
         objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString()));
         objData.MarkAsDeleted();
         objData.Save();
         BindData();
     }
 }