//��ѡɾ�� protected void btnDelete_Click(object sender, DirectEventArgs e) { User bll = new User(); string values = e.ExtraParams["Values"].ToString(); XmlUtils xml = new XmlUtils(values); string id = xml.GetXmlNodeValue("$KeyName$"); if (string.IsNullOrEmpty(id)) return; if (int.Parse(id) < 0) this.GridPanel1.DeleteSelected(); else { bool blFlag = bll.Delete(id); if (blFlag) { this.GridPanel1.Reload(); ShowNotification("ɾ���ɹ�"); } } }
private void Save(bool isHide) { User bll = new User(); BasUser model = new BasUser(); int count = 0; string msg = ""; if (Exists(model)) return; if (count > 0) { ShowNotification("" + msg + "����ɹ���"); this.GridPanel1.Reload(); if (isHide) this.winDetail.Hide(); } else { ShowNotification(msg); } }
/// <summary> /// Ψһ����֤ /// </summary> /// <returns>true</returns> private bool Exists(BasUser model) { User bll = new User(); bool blFlag = false; string strWhere = ""; strWhere = " UserCode='" + model.UserCode + "'"; if (!string.IsNullOrEmpty(model.UserId.ToString())) strWhere += " and userid<>" + model.UserId; blFlag = bll.Exists(strWhere); if (blFlag) ShowNotification("����ʧ�ܣ���" + model.UserCode + "���Ѵ���"); return blFlag; }