protected void btnSave_Click(object sender, EventArgs e) { if (FieldValidation() == false) { return; } String Id = Convert.ToString(Request.QueryString["SelectedId"]); int DiseaseFlag = 0; if (Convert.ToString(Request.QueryString["TableName"]) == "HivDisease") { DiseaseFlag = 1; } else if (Convert.ToString(Request.QueryString["TableName"]) == "Symptom") { DiseaseFlag = 0; } Hashtable theHT = Disease_SymptomDetails(Id, DiseaseFlag); ArrayList theAL = ICDCodeforModule(); ICustomList CustomManager = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList, BusinessProcess.Administration"); if (Id == null) { DataTable RowsAffected = CustomManager.SaveICDCodeRecord(theHT, theAL); string Url = string.Format("{0}?TableName={1}&CategoryId={2}&LstName={3}&Fid={4}&Upd={5}&CCID={6}&ModId={7}", "frmAdmin_CustomList.aspx", ViewState["TableName"].ToString(), ViewState["CategoryId"].ToString(), ViewState["ListName"].ToString(), ViewState["FID"].ToString(), ViewState["Update"].ToString(), ViewState["CCID"].ToString(), ViewState["ModuleId"].ToString()); Response.Redirect(Url); } else { int RowsAffected = CustomManager.UpdateICDCodeRecord(Id, theHT, theAL); string Url = string.Format("{0}?TableName={1}&CategoryId={2}&LstName={3}&Fid={4}&Upd={5}&CCID={6}&ModId={7}", "frmAdmin_CustomList.aspx", ViewState["TableName"].ToString(), ViewState["CategoryId"].ToString(), ViewState["ListName"].ToString(), ViewState["FID"].ToString(), ViewState["Update"].ToString(), ViewState["CCID"].ToString(), ViewState["ModuleId"].ToString()); Response.Redirect(Url); } }