コード例 #1
0
    private void RetreiveMyDetails()
    {
        IUserDetailBussinessService userDetailsBussinessService = null;
        string userId = Session["UserName"].ToString() ?? string.Empty;

        try
        {
            userDetailsBussinessService = BizDelegateFactory.Current.UserDetailBussinessService;
            personalDetailsTable        = ViewState["DataTable"] as DataTable;
            if (personalDetailsTable == null)
            {
                personalDetailsTable   = userDetailsBussinessService.PersonalDetails(userId);
                ViewState["DataTable"] = personalDetailsTable;
            }


            PersonalDetailsView.DataSource = personalDetailsTable;
            PersonalDetailsView.DataBind();
        }
        catch (Exception ex)
        {
            ShowMessage(ex.Message, MessageInfo.Error);
        }
        finally
        {
            userDetailsBussinessService = null;
        }
    }
コード例 #2
0
 protected void PersonalDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e)
 {
     if (e.NewMode == DetailsViewMode.Edit)
     {
         PersonalDetailsView.ChangeMode(DetailsViewMode.Edit);
     }
     if (e.NewMode == DetailsViewMode.ReadOnly)
     {
         PersonalDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
     }
     PersonalDetailsView.DataSource = ViewState["DataTable"];
     PersonalDetailsView.DataBind();
 }
コード例 #3
0
    private void RetreivePersonalDetails()
    {
        IUserDetailBussinessService userDetailsBussinessService = null;

        try
        {
            if (Session["MyCart"] != null && Session["UserName"] != null)
            {
                string userId = Session["UserName"].ToString();
                userDetailsBussinessService    = BizDelegateFactory.Current.UserDetailBussinessService;
                PersonalDetailsView.DataSource = userDetailsBussinessService.PersonalDetails(userId);
                PersonalDetailsView.DataBind();
            }
        }
        catch (Exception ex)
        {
            ShowMessage(ex.Message, MessageInfo.Error);
        }
        finally
        {
            userDetailsBussinessService = null;
        }
    }