private void InsUpdDelGender(char Event, int id) { var msg = ""; if (Event == 'I' || Event == 'U') { var objGender = new GenderClass(id, txtGender.Text); msg = BL_Gender.InsUpdDelGender(Event, objGender, out id); } else { var objGender = new GenderClass(id, ""); msg = BL_Gender.InsUpdDelGender(Event, objGender, out id); } if (DatabaseMessage.ContainMessage(msg)) { _msgBox.ShowSuccess(msg); } else { _msgBox.ShowWarning(msg); } FillGridView(); ClearAll(); }
internal static DropDownList FillddlGenderType(DropDownList ddlGender, int EVENT, int ID, string CODE) { var dt = BL_Gender.GetAllGender(EVENT, ID, CODE, ""); if (dt.Rows.Count > 0) { ddlGender.DataSource = dt; ddlGender.DataValueField = "Id"; ddlGender.DataTextField = "Gender"; ddlGender.DataBind(); } return(ddlGender); }
private void FillGridView() { gvGenderSetup.DataSource = BL_Gender.GetAllGender(1, 0, "", ""); gvGenderSetup.DataBind(); }