protected void Page_Load(object sender, EventArgs e) { if (IsPostBack.IsFalse()) { InitializeSession(); PopulateDropdown(); } else { Page.ClientScript.GetPostBackEventReference(this, String.Empty); String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"]; if (Request["__EVENTTARGET"] == "SearchContactInfo") { ContactInfoList = new CustomList <ContactInfo>(); ContactInfo searchContactInfo = Session[STATIC.StaticInfo.SearchSessionVarName] as ContactInfo; ContactInfoList.Add(searchContactInfo); if (searchContactInfo.IsNotNull()) { PopulateContactInfo(searchContactInfo); ContactDetailList = manager.GetAllContactDetail(searchContactInfo.ContactID); foreach (ContactDetail cD in ContactDetailList) { ContactType cT = ContactTypeList.Find(f => f.ContactTypeID == cD.ContactTypeID); cT.IsChecked = true; } } } } }
protected void Page_Load(object sender, EventArgs e) { try { if (IsPostBack.IsFalse()) { InitializeCombo(); ClearControls(); InitializeSession(); EnableAllControls(false); } else { Page.ClientScript.GetPostBackEventReference(this, String.Empty); String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"]; if (Request["__EVENTTARGET"] == "SearchUser") { Users searchUser = Session[STATIC.StaticInfo.SearchSessionVarName] as Users; objUserList.Add(searchUser); UserList = objUserList; if (searchUser.IsNotNull()) { PopulateUserInformation(searchUser); } } if (Request["__EVENTTARGET"] == "SearchContactInfo") { ContactInfo searchContactInfo = Session[STATIC.StaticInfo.SearchSessionVarName] as ContactInfo; if (searchContactInfo.IsNotNull()) { txtName.Text = searchContactInfo.Name; ddlEmpCode.SelectedValue = searchContactInfo.ContactID.ToString(); } } } } catch (Exception ex) { // logger.Error(ex.ToString()); //logger.Warn(ex.ToString()); } }