Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         AmecUser  LeaveUser = UserInitiate.LoggedUser;;
         DataTable dt        = lvDb.GetLeaves(LeaveUser);
         if (dt != null && dt.Rows.Count > 0)
         {
             gdVwLeave.DataSource = dt;
             gdVwLeave.DataBind();
         }
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                foreach (int i in Enum.GetValues(typeof(Enums.LeaveTypes)))
                {
                    ddlLeaveType.Items.Add(new ListItem(Enums.GetDescription((Enums.LeaveTypes)i), i.ToString()));
                }

                AmecUser  LeaveUser = UserInitiate.LoggedUser;;
                DataTable dt        = lvDb.GetLeaves(LeaveUser);
                if (dt != null && dt.Rows.Count > 0)
                {
                    gdVwLeave.DataSource = dt;
                    gdVwLeave.DataBind();
                }
            }
        }