Beispiel #1
0
 public EmployeesController(IEmployee employee,
                            IDept dept, ApplicationDbContext context,
                            UserManager <MyUserStore> userManager,
                            ILeaveRepo leaveRepo)
 {
     _employee    = employee;
     _dept        = dept;
     _context     = context;
     _userManager = userManager;
     _leaveRepo   = leaveRepo;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            User  user  = new User();
            Dept  dept  = new Dept();
            IUser iuser = DataAccess.CreateUser();

            iuser.InsertUser(user);
            iuser.GetUser(1);

            IDept idept = DataAccess.CreateDept();

            idept.InsertDept(dept);
            idept.GetDept(0102);

            Console.Read();
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iDept = ServiceAgent.getInstance().GetMaintainObjectByName<IDept>(WebConstant.MaintainDeptObject);

            if (!this.IsPostBack)
            {
                if (isPercentage)
                {
                    if (Convert.ToInt32(width) > 100)
                    {
                        drpMaintainSection.Width = Unit.Percentage(100);
                    }
                    else
                    {
                        drpMaintainSection.Width = Unit.Percentage(Convert.ToDouble(width));
                    }
                }
                else
                {
                    drpMaintainSection.Width = Unit.Parse(width);
                }

                this.drpMaintainSection.CssClass = cssClass;
                this.drpMaintainSection.Enabled = enabled;

                if (enabled)
                {
                    initMaintainSection();
                }
                else
                {
                    this.drpMaintainSection.Items.Add(new ListItem("", ""));
                }
            }
        }
        catch (FisException ex)
        {
            //showCmbErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            //showCmbErrorMessage(ex.Message);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {

        try
        {
            userName = Master.userInfo.UserId;

            iDept = ServiceAgent.getInstance().GetMaintainObjectByName<IDept>(WebConstant.MaintainDeptObject);
            
            //注册Customer下拉框的选择事件
            this.cmbMaintainDept.InnerDropDownList.SelectedIndexChanged += new EventHandler(cmbMaintainDept_Selected);
            this.cmbMaintainSection.InnerDropDownList.SelectedIndexChanged += new EventHandler(cmbMaintainSection_Selected);


            if (!this.IsPostBack)
            {
                strmsgSelectOne = this.GetLocalResourceObject(Pre + "_MsgSelectOne").ToString();
                strmsgDelConfirm = this.GetLocalResourceObject(Pre + "_MsgDelConfirm").ToString();
                strmsgSelDept = this.GetLocalResourceObject(Pre + "_MsgSelDept").ToString();
                strmsgSelSection = this.GetLocalResourceObject(Pre + "_MsgSelSection").ToString();
                strmsgSelLine = this.GetLocalResourceObject(Pre + "_MsgSelLine").ToString();
                strmsgSelFISLine = this.GetLocalResourceObject(Pre + "_MsgSelFISLine").ToString();
                strmsgSelStart = this.GetLocalResourceObject(Pre + "_MsgSelStart").ToString();
                strmsgSelEnd = this.GetLocalResourceObject(Pre + "_MsgSelEnd").ToString();

                userName = Master.userInfo.UserName;
                //this.HiddenUserName.Value = userName;
                initLabel();
                ShowAllLineList();
               // bindTable(null, DEFAULT_ROWS);
            }
            ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "InitControl", "initControls();", true);
        }
        catch (FisException ex)
        {
            showErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            showErrorMessage(ex.Message);
        }
    }
 public CompanyServiceConcrete(ICompany comp, IDept dept)
 {
     _compRespository = comp;
     _deptRepo        = dept;
 }
 public DepartmentsController(IDept dept)
 {
     _dept = dept;
 }