protected void btnSave_Click(object sender, EventArgs e)
        {
            if (CEmpName.SelectedValue == "0")
            {
                lblEmpvalidation.Visible = true;
                CEmpName.Focus();
                return;
            }

            if (btnSave.Text == "Save")
            {
                DTO.EmpId      = Convert.ToInt32(CEmpName.SelectedValue);
                DTO.RoleId     = Convert.ToInt32(ddlRoleName.SelectedValue);
                DTO.CreateDate = System.DateTime.Now;
                DTO.CreateBy   = HttpContext.Current.User.Identity.Name;
                URBLL.Add(DTO);
            }
            else
            {
                DTO.UserRoleId = Convert.ToInt32(HFUserRoleId.Value);
                DTO.EmpId      = Convert.ToInt32(CEmpName.SelectedValue);
                DTO.RoleId     = Convert.ToInt32(ddlRoleName.SelectedValue);

                DTO.UpdateDate = System.DateTime.Now;
                DTO.UpdateBy   = HttpContext.Current.User.Identity.Name;
                URBLL.Edit(DTO);
                btnSave.Text = "Save";
            }
            pagingLoal();
            clearCntrol();
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (btnSave.Text == "Save")
            {
                DTO.EmpId      = Convert.ToInt32(ddlEmpName.SelectedValue);
                DTO.RoleId     = Convert.ToInt32(ddlRoleName.SelectedValue);
                DTO.CreateDate = System.DateTime.Now;
                DTO.CreateBy   = HttpContext.Current.User.Identity.Name;
                URBLL.Add(DTO);
            }
            else
            {
                // start log insert
                string Logfield = "";
                var    bb       = URBLL.LoadUserRole_linkbuttonEmpName_New_2(Convert.ToInt32(HFUserRoleId.Value), 0, 0);
                Logfield        = "UserRoleId-" + HFUserRoleId.Value + ";" + " Employee-" + ddlEmpName.SelectedItem + ";" + " Role-" + bb.First().RoleName.ToString() + "#" + ddlRoleName.SelectedItem + ";";
                LogDTO.LogField = Logfield;
                LogDTO.LogBy    = HttpContext.Current.User.Identity.Name;
                LogDTO.LogDate  = System.DateTime.Now;
                LogBLL.AddUserRole_Log(LogDTO);
                // end log insert

                DTO.UserRoleId = Convert.ToInt32(HFUserRoleId.Value);
                DTO.EmpId      = Convert.ToInt32(ddlEmpName.SelectedValue);
                DTO.RoleId     = Convert.ToInt32(ddlRoleName.SelectedValue);

                DTO.UpdateDate = System.DateTime.Now;
                DTO.UpdateBy   = HttpContext.Current.User.Identity.Name;
                URBLL.Edit(DTO);
                btnSave.Text = "Save";
            }
            pagingLoal();
            clearCntrol();
        }