Beispiel #1
0
        protected void lbtnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                BLL.DataCenterBiz biz = new BLL.DataCenterBiz();
                GridViewRow       gr  = (GridViewRow)((LinkButton)sender).Parent.Parent;
                string            ID  = ((Label)gr.FindControl("lblAssociationCode")).Text;

                var res = biz.DeleteAsscoiation(ID);
                if (!res.IsError)
                {
                    initGridAssociation();
                    UCSuccess.ShowMessageSuccess = SysMessage.DeleteSuccess;
                    UCSuccess.ShowModalSuccess();
                }
                else
                {
                    UCError.ShowMessageError = res.ErrorMsg;
                    UCError.ShowModalError();
                }
            }
            catch (Exception ex)
            {
                UCError.ShowMessageError = ex.Message;
                UCError.ShowModalError();
            }
        }