protected void CreateButton_Click(object sender, EventArgs e) { string key = ASPxGridView.GetDetailRowKeyValue((Control)sender).ToString(); ViewState["SecretaryID"] = key; SecertaryRepository secertaryRepository = new SecertaryRepository(); string UserID = secertaryRepository.GetUserIDBySecertaryID(int.Parse(key)); if (UserID == null) { popup.Left = 400; popup.Top = 600; popup.ResizingMode = DevExpress.Web.ASPxClasses.ResizingMode.Live; popup.ShowOnPageLoad = true; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('This Secretary Has An Account ');", true); } }
protected void ChangePasswordpopup_Click(object sender, EventArgs e) { string key = ASPxGridView.GetDetailRowKeyValue((Control)sender).ToString(); ViewState["SecretaryID"] = key; SecertaryRepository secertaryRepository = new SecertaryRepository(); string UserID = secertaryRepository.GetUserIDBySecertaryID(int.Parse(key)); ViewState["UserID"] = UserID; if (UserID != null) { lblUserName.Text = secertaryRepository.getUserNameByUserID(UserID); ChangePSpopup.Left = 400; ChangePSpopup.Top = 600; ChangePSpopup.ResizingMode = DevExpress.Web.ASPxClasses.ResizingMode.Live; ChangePSpopup.ShowOnPageLoad = true; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('This Secretary Don't Have An Account ');", true); } }