protected void lnkBtnRemove_Click(object sender, EventArgs e) { LinkButton lnkBtnRemove = (LinkButton)sender; string territoryid = lnkBtnRemove.CommandArgument; bool result = new bool(); //bool temp = true; FranchisorDAL franchisorDal = new FranchisorDAL(); result = franchisorDal.DeleteTerritory(territoryid, 0); var currentSession = IoC.Resolve <ISessionContext>().UserSession; int roleID = Convert.ToInt32(currentSession.CurrentOrganizationRole.RoleId); int franchiseeID = Convert.ToInt32(currentSession.CurrentOrganizationRole.OrganizationId); var listTerritory = franchisorDal.GetFranchiseeTerritory(txtSearch.Text.Trim(), txtZipCode.Text, 3, franchiseeID, roleID, Convert.ToInt32(currentSession.UserId)); ETerritory[] objTerritory = null; if (listTerritory != null) { objTerritory = listTerritory.ToArray(); } BindData(objTerritory); }
public string DeleteFranchiseeTerritory(string territoryid) { bool result; FranchisorDAL objFranchisorDal = new FranchisorDAL(); //mode - 0 for delete territory result = objFranchisorDal.DeleteTerritory(territoryid, 0); return(result.ToString()); }