示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblName.Text = PrjPub.CurrentStudent.EmployeeName;
                OrganizationBLL objOrgBll = new OrganizationBLL();
                lblOrg.Text  = objOrgBll.GetOrganization(PrjPub.CurrentStudent.StationOrgID).ShortName;
                lblPost.Text = PrjPub.CurrentStudent.PostName;

                ExamResultBLL objBll = new ExamResultBLL();
                ViewState["NowOrgID"] = Convert.ToInt32(ConfigurationManager.AppSettings["StationID"]);
                IList <RailExam.Model.ExamResult> objList = objBll.GetExamResults(PrjPub.StudentID, 0);
                gvExam.DataSource = objList;
                gvExam.DataBind();

                hfOrgID.Value    = ConfigurationManager.AppSettings["StationID"].ToString();
                hfIsServer.Value = PrjPub.IsServerCenter.ToString();

                BindGrid();
            }
            else
            {
                if (Request.Form.Get("OutPut") != null && Request.Form.Get("OutPut") != "")
                {
                    OutputData(Request.Form.Get("OutPut"), Request.Form.Get("OutPutOrg"));
                }

                if (Request.Form.Get("OutPutRandom") != null && Request.Form.Get("OutPutRandom") != "")
                {
                    OutputRandomExam(Request.Form.Get("OutPutRandom"));
                }
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.IsWuhan())
                {
                    Grid1.Columns[3].HeaderText = "Ô±¹¤±àÂë";
                }
                else
                {
                    Grid1.Columns[3].HeaderText = "¹¤×ʱàºÅ";
                }

                string strId = Request.QueryString.Get("employeeID");
                if (strId != null && strId != "")
                {
                    ViewState["ChooseId"]   = strId;
                    ViewState["UpdateMode"] = 1;
                }
                else
                {
                    ViewState["ChooseId"]   = "";
                    ViewState["UpdateMode"] = 0;
                }

                BindStationStart();
                BindOrgStart();
                BindWorkShopStart();
                BindSystemStart();
                BindTypeStart();
                BindPostStart();

                EmployeeBLL             bll      = new EmployeeBLL();
                RailExam.Model.Employee employee = bll.GetEmployee(Convert.ToInt32(Request.QueryString.Get("nowEmployeeID")));
                OrganizationBLL         orgbll   = new OrganizationBLL();
                int stationOrgID = orgbll.GetStationOrgID(employee.OrgID);
                if (stationOrgID != 200)
                {
                    ddlStation.SelectedValue = stationOrgID.ToString();
                    OrganizationBLL objBll = new OrganizationBLL();
                    IList <RailExam.Model.Organization> objList =
                        objBll.GetOrganizationsByParentID(Convert.ToInt32(ddlStation.SelectedValue));
                    foreach (RailExam.Model.Organization organization in objList)
                    {
                        ListItem item = new ListItem();
                        item.Value = organization.OrganizationId.ToString();
                        item.Text  = organization.ShortName;
                        ddlWorkShop.Items.Add(item);
                    }

                    ddlStation.Enabled = false;
                }

                ViewState["StartRow"] = 0;
                ViewState["EndRow"]   = Grid1.PageSize;

                ViewState["EmploySortField"] = "nlssort(a.employee_name,'NLS_SORT=SCHINESE_PINYIN_M')";
                BindGrid(ViewState["EmploySortField"].ToString());
            }
        }
示例#3
0
 public LoginController()
 {
     _user            = new UserBll();
     _moduleBll       = new ModuleBLL();
     _organizationBll = new OrganizationBLL();
     _loginBll        = new LoginBll();
 }
示例#4
0
    protected string GetOrganizationInfo(Object obj)
    {
        int    OrganizationID = 0;
        string name           = "";

        try
        {
            OrganizationID = (int)obj;
        }
        catch { return("-"); }

        if (OrganizationID > 0)
        {
            Organization theClass = null;

            try
            {
                theClass = OrganizationBLL.GetOrganizationById(OrganizationID);
            }
            catch { }

            if (theClass != null)
            {
                name = theClass.Name;
            }
        }

        return(name);
    }
        private void BindOrgTree(string selectId)
        {
            OrganizationBLL organizationsBLL = new OrganizationBLL();

            if (PrjPub.CurrentLoginUser.SuitRange == 1)
            {
                IList <RailExam.Model.Organization> organizations = organizationsBLL.GetOrganizationsByLevel(2);

                foreach (RailExam.Model.Organization organization in organizations)
                {
                    if (organization.LevelNum == 1)
                    {
                        continue;
                    }
                    TreeViewNode tvNode = new TreeViewNode();
                    tvNode.ID   = organization.OrganizationId.ToString();
                    tvNode.Text = organization.ShortName;
                    tvView.Nodes.Add(tvNode);
                }
            }
            else
            {
                TreeViewNode tvNode = new TreeViewNode();
                tvNode.ID   = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                tvNode.Text = organizationsBLL.GetOrganization(PrjPub.CurrentLoginUser.StationOrgID).ShortName;
                tvView.Nodes.Add(tvNode);
            }
        }
        private void BindOrganizationTree()
        {
            OrganizationBLL organizationBLL = new OrganizationBLL();
            IList <RailExam.Model.Organization> organizationList = organizationBLL.GetOrganizations(0, 0, "", 0, 0,
                                                                                                    "", "", "", "", "", "",
                                                                                                    "", "", "", "", 0, 40,
                                                                                                    "LevelNum,OrganizationId ASC");

            string strID = Request.QueryString["id"];

            string[] strIDS = { };
            if (!string.IsNullOrEmpty(strID))
            {
                strIDS = strID.Split(',');
            }

            if (organizationList.Count > 0)
            {
                TreeViewNode tvn = null;

                foreach (Organization organization in organizationList)
                {
                    tvn              = new TreeViewNode();
                    tvn.ID           = organization.OrganizationId.ToString();
                    tvn.Value        = organization.OrganizationId.ToString();
                    tvn.Text         = organization.ShortName;
                    tvn.ToolTip      = organization.FullName;
                    tvn.ShowCheckBox = true;

                    foreach (string strOrgID in strIDS)
                    {
                        if (strOrgID == organization.OrganizationId.ToString())
                        {
                            tvn.Checked = true;
                        }
                    }

                    if (organization.ParentId == 0)
                    {
                        tvOrg.Nodes.Add(tvn);
                    }
                    else
                    {
                        try
                        {
                            tvOrg.FindNodeById(organization.ParentId.ToString()).Nodes.Add(tvn);
                        }
                        catch
                        {
                            tvOrg.Nodes.Clear();
                            SessionSet.PageMessage = "数据错误!";
                            return;
                        }
                    }
                }
            }

            tvOrg.DataBind();
            tvOrg.ExpandAll();
        }
示例#7
0
        // GET: Home
        public ActionResult homepage()
        {
            OrganizationBLL     organizationBLL = new OrganizationBLL();
            List <Organization> organizations   = organizationBLL.GetLastOrganizations();

            return(View(organizations));
        }
示例#8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            OrganizationTextBox.Attributes.Add("onchange", "OrganizationTextBox_OnChange()");
            AreaTextBox.Attributes.Add("onchange", "AreaTextBox_OnChange()");
            ProjectTextBox.Attributes.Add("onchange", "ProjectTextBox_OnChange()");

            LoadKPI();
            LoadPerson();
            LoadActivity();
            LoadProject();
            LoadArea();
            LoadOrganization();

            if (OrganizationId == 0)
            {
                List <Organization> theOrgList = new List <Organization>();
                try
                {
                    theOrgList = OrganizationBLL.GetOrganizationsByUser("1 = 1");
                }
                catch { }

                if (theOrgList.Count == 1)
                {
                    OrganizationTextBox.Text = theOrgList[0].Name;
                    OrganizationId           = theOrgList[0].OrganizationID;
                }
            }
        }
    }
示例#9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            List <Organization> theOrganizations = new List <Organization>();
            try
            {
                theOrganizations = OrganizationBLL.GetOrganizationsByUser("1 = 1");
            }
            catch (Exception exc)
            {
                SystemMessages.DisplaySystemErrorMessage(exc.Message);
                return;
            }

            if (theOrganizations.Count > 0)
            {
                OrganizationsExists.Value = "true";
            }
            else
            {
                addIcon.Attributes["class"] = "zmdi zmdi-plus-circle-o zmdi-hc-fw animated pulse";
            }
        }
    }
示例#10
0
 public MenuController()
 {
     _organizationBll = new OrganizationBLL();
     _commonBll       = new CommonBll();
     _moduleBll       = new ModuleBLL();
     _menuBll         = new MenuBll();
 }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                OrganizationBLL objOrgBll = new OrganizationBLL();
                IList <RailExam.Model.Organization> objOrgList = objOrgBll.GetOrganizationsByLevel(2);

                ListItem item = new ListItem();
                item.Text  = "--请选择--";
                item.Value = "0";
                ddlOrg.Items.Add(item);

                foreach (Organization organization in objOrgList)
                {
                    if (organization.OrganizationId != 1)
                    {
                        item       = new ListItem();
                        item.Text  = organization.ShortName;
                        item.Value = organization.OrganizationId.ToString();
                        ddlOrg.Items.Add(item);
                    }
                }

                if (!PrjPub.IsServerCenter)
                {
                    OrgConfigBLL orgConfigBLL = new OrgConfigBLL();
                    ddlOrg.SelectedValue = orgConfigBLL.GetOrgConfig().OrgID.ToString();
                    txtUserName.Focus();
                }
            }
        }
示例#12
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool   ret    = false;
            string result = "";

            if (action == "new")
            {
                OrganizationBLL bll = new OrganizationBLL();
                ret    = bll.CreateOrgInfo(txtOrgName.Text, txtOrgCode.Text, txtOrgDesc.Text, txtOrderNo.Text);
                result = "添加";
            }
            else if (action == "edit")
            {
                OrganizationBLL bll = new OrganizationBLL();
                Guid            id  = new Guid(orgCode);
                ret    = bll.UpdateOrgInfo(id, txtOrgName.Text, txtOrgCode.Text, txtOrgDesc.Text, txtOrderNo.Text);
                result = "更新";
            }

            if (ret)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>top.ymPrompt.doHandler('ok', false);</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>top.ymPrompt.doHandler('failed', false);</script>");
            }
        }
示例#13
0
        private void DownloadExamInfoExcel()
        {
            string filename = Server.MapPath("/RailExamBao/Excel/Count.xls");

            int             _OrgId = Convert.ToInt32(Request.QueryString["OrgID"]);
            OrganizationBLL orgBll = new OrganizationBLL();
            Organization    org    = orgBll.GetOrganization(_OrgId);

            if (File.Exists(filename))
            {
                FileInfo file = new FileInfo(filename);
                this.Response.Clear();
                this.Response.Buffer          = true;
                this.Response.Charset         = "utf-7";
                this.Response.ContentEncoding = Encoding.UTF7;
                // 添加头信息,为"文件下载/另存为"对话框指定默认文件名
                this.Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(org.ShortName + "考试列表") + ".xls");
                // 添加头信息,指定文件大小,让浏览器能够显示下载进度
                this.Response.AddHeader("Content-Length", file.Length.ToString());
                // 指定返回的是一个不能被客户端读取的流,必须被下载
                this.Response.ContentType = "application/ms-excel";
                // 把文件流发送到客户端
                this.Response.WriteFile(file.FullName);
            }
        }
示例#14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string struesrId = PrjPub.StudentID;
                hfEmployeeID.Value = struesrId;
                try
                {
                    lblName.Text = PrjPub.CurrentStudent.EmployeeName;
                }
                catch
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=超时时间已到,请重新登录");
                }

                OrganizationBLL objOrgBll = new OrganizationBLL();
                lblOrg.Text  = objOrgBll.GetOrganization(PrjPub.CurrentStudent.StationOrgID).ShortName;
                lblPost.Text = PrjPub.CurrentStudent.PostName;


                //foreach (RailExam.Model.Exam exam in ExamList)
                //{
                //    exam.ExamName = "<a onclick=AttendExam('" + exam.ExamId + "','" + exam.paperId + "','" + exam.ExamType + "') href=# title='参加考试' > " + exam.ExamName + " </a>";
                //}
                //gvExam.DataSource = ExamList;
                //gvExam.DataBind();
            }
        }
示例#15
0
    protected void SaveOrganizationButton_Click(object sender, EventArgs e)
    {
        //Create the organizacion in the database
        if (OrganizationId == 0)
        {
            try
            {
                OrganizationBLL.InsertOrganization(OrganizationNameTextBox.Text);
            }
            catch (Exception exc)
            {
                SystemMessages.DisplaySystemErrorMessage(exc.Message);
                return;
            }
            SystemMessages.DisplaySystemMessage(Resources.Organization.MessageCreateOk);
        }
        else
        {
            try
            {
                OrganizationBLL.UpdateOrganization(OrganizationId, OrganizationNameTextBox.Text);
            }
            catch (Exception exc)
            {
                SystemMessages.DisplaySystemErrorMessage(exc.Message);
                return;
            }
            SystemMessages.DisplaySystemMessage(Resources.Organization.MessageUpdateOk);
        }

        Response.Redirect("~/Organization/ListOrganizations.aspx");
    }
示例#16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string strStationID = ConfigurationManager.AppSettings["StationID"];

                if (strStationID == "200")
                {
                    lblDate.Text = PrjPub.GetRailName() + "·þÎñÆ÷";
                }
                else
                {
                    OrganizationBLL orgBll       = new OrganizationBLL();
                    Organization    organization = orgBll.GetOrganization(Convert.ToInt32(strStationID));
                    lblDate.Text = organization.ShortName + "·þÎñÆ÷";
                }
                string       strSql = "select * from Computer_Server where Computer_Server_No='" + PrjPub.ServerNo + "'";
                OracleAccess db     = new OracleAccess();
                DataSet      ds     = db.RunSqlDataSet(strSql);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    lblServerName.Text = ds.Tables[0].Rows[0]["Computer_Server_Name"].ToString();
                }

                lblServerNo.Text = PrjPub.ServerNo.ToString();
            }
        }
示例#17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string transferID = Request.QueryString.Get("transferID");

                EmployeeTransferBLL objTransferBll = new EmployeeTransferBLL();
                EmployeeTransfer    obj            = objTransferBll.GetEmployeeTransfer(Convert.ToInt32(transferID));
                txtName.Text            = obj.EmployeeName;
                txtWorkNo.Text          = obj.WorkNo;
                lblOrg.Text             = obj.TransferToOrgName;
                ViewState["EmployeeID"] = obj.EmployeeID.ToString();

                OracleAccess db     = new OracleAccess();
                string       strSql = "select * from Employee where Employee_ID=" + ViewState["EmployeeID"];
                DataRow      dr     = db.RunSqlDataSet(strSql).Tables[0].Rows[0];
                txtPostNo.Text = dr["Identity_CardNo"].ToString();

                BindWorkShopStart();
                BindWorkgroupStart();

                OrganizationBLL objBll = new OrganizationBLL();
                IList <RailExam.Model.Organization> objList =
                    objBll.GetOrganizationsByParentID(obj.TransferToOrgID);
                foreach (RailExam.Model.Organization organization in objList)
                {
                    ListItem item = new ListItem();
                    item.Value = organization.OrganizationId.ToString();
                    item.Text  = organization.ShortName;
                    ddlWorkshop.Items.Add(item);
                }
            }
        }
示例#18
0
        private void InitOrg()
        {
            OrganizationBLL          bll     = new OrganizationBLL();
            IList <OrganizationInfo> orgList = bll.GetOrgList();

            ddlOrg.Items.Clear();
            foreach (OrganizationInfo info in orgList)
            {
                ListItem li = new ListItem();
                li.Text  = info.OrgName;
                li.Value = info.ID.ToString();
                if (li.Value.Equals(OrgCode, StringComparison.OrdinalIgnoreCase))
                {
                    li.Selected = true;
                }
                ddlOrg.Items.Add(li);
            }

            //获取某个组织的信息
            OrganizationInfo orgInfo = bll.GetOrgByID(ddlOrg.SelectedValue);

            if (orgInfo != null)
            {
                txtOrderNo.Text = orgInfo.OrderNo.ToString();
                txtOrgCode.Text = orgInfo.OrgCode;
                txtOrgName.Text = orgInfo.OrgName;
            }
        }
示例#19
0
        private void BindOrg()
        {
            OrganizationBLL bll = new OrganizationBLL();

            ddlOrg.DataSource = bll.GetOrgList();
            ddlOrg.DataBind();
            ddlOrg.Items.Insert(0, new ListItem("选择", ""));
        }
示例#20
0
 public SignUpController()
 {
     _user            = new UserBll();
     _moduleBll       = new ModuleBLL();
     _organizationBll = new OrganizationBLL();
     _emailBll        = new EmailBLL();
     _templateBll     = new TemplateBLL();
 }
示例#21
0
        private void BindOrgInfo()
        {
            OrganizationBLL objBll = new OrganizationBLL();

            txtTime.Text      = objBll.GetOrgSynchronizeTime(Convert.ToInt32(OrgList.SelectedValue));
            txtIPAddress.Text = objBll.GetOrgIPAddress(Convert.ToInt32(OrgList.SelectedValue));
            chkUpload.Checked = objBll.IsAutoUpload(Convert.ToInt32(OrgList.SelectedValue));
        }
示例#22
0
        public void GetInexistentOrganization()
        {
            //Prueba el comportamiento cuando no existe organización.
            OrganizationBLL organizationBll = new OrganizationBLL();
            ResultBM        result          = organizationBll.GetOrganization(99999);

            Assert.IsNull(result.GetValue(), "No debería existir");
        }
示例#23
0
        private void BindOrgTree()
        {
            OrganizationBLL organizationBLL = new OrganizationBLL();

            if (PrjPub.CurrentLoginUser.SuitRange == 1)
            {
                IList <RailExam.Model.Organization> organizationList = organizationBLL.GetOrganizations();

                Pub.BuildComponentArtTreeView(tvOrg, (IList)organizationList, "OrganizationId",
                                              "ParentId", "ShortName", "FullName", "OrganizationId", null, null, null);
            }
            else
            {
                int stationID = organizationBLL.GetStationOrgID(Convert.ToInt32(SessionSet.OrganizationID));
                IList <RailExam.Model.Organization> organizationList =
                    organizationBLL.GetOrganizations(stationID);

                if (organizationList.Count > 0)
                {
                    TreeViewNode tvn = null;

                    foreach (RailExam.Model.Organization organization in organizationList)
                    {
                        tvn         = new TreeViewNode();
                        tvn.ID      = organization.OrganizationId.ToString();
                        tvn.Value   = organization.IdPath.ToString();
                        tvn.Text    = organization.ShortName;
                        tvn.ToolTip = organization.FullName;

                        if (organization.ParentId == 1)
                        {
                            tvOrg.Nodes.Add(tvn);
                        }
                        else
                        {
                            try
                            {
                                tvOrg.FindNodeById(organization.ParentId.ToString()).Nodes.Add(tvn);
                            }
                            catch
                            {
                                tvOrg.Nodes.Clear();
                                SessionSet.PageMessage = "数据错误!";
                                return;
                            }
                        }
                    }
                }

                tvOrg.DataBind();
            }

            if (tvOrg.Nodes.Count > 0)
            {
                tvOrg.SelectedNode      = tvOrg.Nodes[0];
                tvOrg.Nodes[0].Expanded = true;
            }
        }
示例#24
0
        public async Task <ActionResult> Create
            ([Bind(Include = "DisplayName,JobTitle,StreetAddress,City,State,PostalCode")] User corp)
        {
            // Create dummy data for Industry
            List <SelectListItem> industryList = new List <SelectListItem>();

            industryList.Add(new SelectListItem {
                Value = "1", Text = "Food"
            });
            industryList.Add(new SelectListItem {
                Value = "2", Text = "Electronic"
            });
            industryList.Add(new SelectListItem {
                Value = "3", Text = "IT"
            });
            ViewBag.industryList = new SelectList(industryList, "Value", "Text");

            // Create dummy data for State
            List <SelectListItem> stateList = new List <SelectListItem>();

            stateList.Add(new SelectListItem {
                Value = "1", Text = "Washington"
            });
            stateList.Add(new SelectListItem {
                Value = "2", Text = "Los Angeles"
            });
            stateList.Add(new SelectListItem {
                Value = "3", Text = "Texas"
            });
            ViewBag.stateList = new SelectList(stateList, "Value", "Text");

            PasswordProfile pp = new PasswordProfile();

            pp.ForceChangePasswordNextLogin = false;
            pp.Password = "******";

            corp.UserPrincipalName = Helper.RemoveSpace(corp.DisplayName) + LBAS.Web.Utils.Constants.Email;
            corp.AccountEnabled    = true;
            corp.PasswordProfile   = pp;
            corp.MailNickname      = Helper.RemoveSpace(corp.DisplayName);
            corp.UserType          = LBAS.Web.Utils.Constants.VirtualUser;
            corp.Department        = LBAS.Web.Utils.Constants.Corporation;

            OrganizationBLL orgBLL = new OrganizationBLL();

            try
            {
                await orgBLL.CreateCorporation(corp);

                ViewBag.Message = "New corporation was saved";
                return(View());
            }
            catch (Exception exception)
            {
                ModelState.AddModelError("", exception.Message);
                return(View());
            }
        }
示例#25
0
        protected void btnOk_Click(object sender, EventArgs e)
        {
            OracleAccess db     = new OracleAccess();
            string       strSql = "select * from Employee where Employee_ID=" + ViewState["EmployeeID"];
            DataRow      dr     = db.RunSqlDataSet(strSql).Tables[0].Rows[0];


            int orgID;

            if (ddlWorkgroup.SelectedValue != "0")
            {
                orgID = Convert.ToInt32(ddlWorkgroup.SelectedValue);
            }
            else
            {
                orgID = Convert.ToInt32(ddlWorkshop.SelectedValue);
            }

            OrganizationBLL organizationBLL         = new OrganizationBLL();
            EmployeeBLL     objEmployeeBll          = new EmployeeBLL();
            IList <RailExam.Model.Employee> objView =
                objEmployeeBll.GetEmployeeByWhereClause("GetStationOrgID(a.Org_ID)=" + organizationBLL.GetStationOrgID(orgID) +
                                                        " and Work_No='" + txtWorkNo.Text.Trim() + "'");

            if (objView.Count > 0)
            {
                SessionSet.PageMessage = "该员工编码在本单位已经存在!";
                return;
            }
            strSql = "update Employee "
                     + " set Employee_Name='" + txtName.Text + "',"
                     + "Org_ID=" + orgID + ","
                     + "Work_No='" + txtWorkNo.Text + "',"
                     + "identity_CardNo='" + txtPostNo.Text + "',"
                     + "PinYin_Code='" + Pub.GetChineseSpell(txtName.Text) + "' "
                     + " where Employee_ID=" + ViewState["EmployeeID"];
            db.ExecuteNonQuery(strSql);

            strSql = "insert into ZJ_Employee_Work "
                     + " values(Employee_Work_Seq.nextval,  "
                     + dr["EMPLOYEE_ID"]
                     + ", to_char(sysdate,'yyyy-mm-dd')," + dr["org_id"] + "," + orgID + ","
                     + dr["Post_ID"] + "," + dr["Post_ID"] + ","
                     + "'',sysdate,'" + PrjPub.CurrentLoginUser.EmployeeName + "',"
                     + "to_date('" + dr["Post_Date"] + "','YYYY-MM-DD HH24:MI:SS'))";
            db.ExecuteNonQuery(strSql);

            string transferID = Request.QueryString.Get("transferID");
            EmployeeTransferBLL objTransferBll = new EmployeeTransferBLL();

            objTransferBll.DeleteEmployeeTransfer(Convert.ToInt32(transferID));

            SystemLogBLL objLogBll = new SystemLogBLL();

            objLogBll.WriteLog("将" + dr["Employee_Name"] + "调至" + lblOrg.Text);

            Response.Write("<script>window.returnValue='true';window.close();</script>");
        }
示例#26
0
 protected void btnDelOrg_Click(object sender, EventArgs e)
 {
     if (ddlOrg.SelectedItem != null)
     {
         OrganizationBLL bll = new OrganizationBLL();
         bll.DeleteOrgInfoByID(ddlOrg.SelectedItem.Value);
         lbReload_Click(sender, e);
     }
 }
示例#27
0
        public void GetOrganization()
        {
            //Prueba el comportamiento cuando existe organización.
            OrganizationBLL organizationBll = new OrganizationBLL();
            ResultBM        result          = organizationBll.GetOrganization(1);

            Assert.IsNotNull(result.GetValue(), "Debería existir");
            Assert.AreEqual(result.GetValue <OrganizationBM>().name, "Organización 01", "Debería ser Organización 01");
        }
示例#28
0
 protected void btnDelDept_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(DeptCode))
     {
         OrganizationBLL bll = new OrganizationBLL();
         bll.DeleteDepartmentByCode(DeptCode);
         lbReload_Click(sender, e);
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("微机教室信息") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                if (PrjPub.HasDeleteRight("微机教室信息") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }

                //string orgid  =  Request.QueryString["id"];
                //initComputerRoomInfo(orgid);
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("../Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                string strQuery = Request.QueryString.Get("strQuery");
                if (string.IsNullOrEmpty(strQuery))
                {
                    GetSql();
                }
                else
                {
                    string[] str = strQuery.Split('|');

                    if (!string.IsNullOrEmpty(str[0]))
                    {
                        hfSelectOrg.Value = str[0];
                        OrganizationBLL orgbll = new OrganizationBLL();
                        txtOrg.Text = orgbll.GetOrganization(Convert.ToInt32(str[0])).ShortName;
                    }

                    txtCOMPUTER_ROOM.Text = str[1];
                    txtAddress.Text       = str[2];
                    ddl.SelectedValue     = str[3];
                    btnQuery_Click(null, null);
                }

                hfOrgID.Value  = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                hfRoleID.Value = PrjPub.CurrentLoginUser.RoleID.ToString();
            }
        }
示例#30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PrjPub.CurrentLoginUser == null)
            {
                Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                return;
            }
            txtOrg.Text = hfOrgName.Value;

            if (!IsPostBack && !Grid1.IsCallback)
            {
                lbltitle.Visible = false;
                Grid1.Visible    = false;
                btnExcel.Visible = false;

                btnModify.Visible    = false;
                btnInput.Visible     = false;
                btnBind.Visible      = true;
                btnExamOther.Visible = false;
                excel.Visible        = false;

                Grid1.Levels[0].Columns[1].HeadingText = "上岗证号";

                if (PrjPub.CurrentLoginUser.SuitRange != 1)
                {
                    ImgSelectOrg.Visible = false;
                    OrganizationBLL objbll = new OrganizationBLL();
                    txtOrg.Text = objbll.GetOrganization(PrjPub.CurrentLoginUser.StationOrgID).ShortName;
                    hfOrg.Value = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                }

                if (Session["EmployeeTable"] != null)
                {
                    Session.Remove("EmployeeTable");
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(hfOrg.Value))
                {
                    OrganizationBLL objbll = new OrganizationBLL();
                    txtOrg.Text = objbll.GetOrganization(Convert.ToInt32(hfOrg.Value)).ShortName;
                }
            }

            string str = Request.Form.Get("Refresh");

            if (str != null && str == "refresh")
            {
                EmployeeErrorBLL objErrorBll = new EmployeeErrorBLL();
                Grid1.DataSource = objErrorBll.GetEmployeeErrorByOrgIDAndImportTypeID(Convert.ToInt32(hfOrg.Value));
                Grid1.DataBind();
                Grid1.Visible = true;
            }
        }
示例#31
0
        //获取要发送的教师机构信息
        public void GetTeacher(HttpContext context)
        {
            DataTable dt = new DataTable();
            OrganizationBLL organizationBll = new OrganizationBLL();
            ShortOranization shortoranization = new ShortOranization();
            shortoranization.OrganizationIDs = context.Request.Params["OrganizationIDs"].ToString();

            dt = IES.Common.ListToDateUtil.ListToDataTable<IES.JW.Model.ShortOranization>(organizationBll.Organization_S_List(shortoranization));

            if (dt != null && dt.Rows.Count > 0)
            {
                context.Response.Write(Tools.JsonConvert.GetJSON(dt));
            }
            else
            {
                context.Response.Write("empty");
            }
        }