Ejemplo n.º 1
0
    private void BindGrid7()
    {
        string connectionString = ConfigurationManager.ConnectionStrings["ERPconnectionstring"].ToString();

        Ede.Uof.Utility.Data.DatabaseHelper m_db = new Ede.Uof.Utility.Data.DatabaseHelper(connectionString);

        StringBuilder cmdTxt = new StringBuilder();
        StringBuilder QUERYS = new StringBuilder();


        cmdTxt.AppendFormat(@" 
                            SELECT 
                            [ID]
                            ,[KINDS]
                            ,[NAMES]
                            ,[MOQS]
                            ,[INDAYS]
                            ,[COMMENTS]
                            FROM [TKBUSINESS].[dbo].[TBPURMOQ]
                            WHERE [KINDS]=@KINDS
                            ORDER BY [ID]
                            ");



        m_db.AddParameter("@KINDS", "貼紙");
        //m_db.AddParameter("@EDATE", EDATE);

        DataTable dt = new DataTable();

        dt.Load(m_db.ExecuteReader(cmdTxt.ToString()));

        Grid7.DataSource = dt;
        Grid7.DataBind();
    }
Ejemplo n.º 2
0
        private void btnDesnaStrelica_Click(object sender, RoutedEventArgs e)
        {
            vrednost -= 750;
            brojac++;
            if (brojac == 3)
            {
                btnDesnaStrelica.Visibility = Visibility.Hidden;
            }
            else if (brojac == 0 || brojac == 1)
            {
                btnLevaStrelica.Visibility  = Visibility.Visible;
                btnDesnaStrelica.Visibility = Visibility.Visible;
            }

            DoubleAnimation doubleAnimation = new DoubleAnimation();
            PowerEase       powerEase       = new PowerEase();

            powerEase.EasingMode = EasingMode.EaseInOut;
            powerEase.Power      = 10;

            doubleAnimation.To       = vrednost;
            doubleAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 700));
            // doubleAnimation.EasingFunction = powerEase;

            Grid1.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
            Grid2.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
            Grid3.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
            Grid4.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
            Grid5.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
            Grid6.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
            Grid7.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
        }
Ejemplo n.º 3
0
        protected void Tree2_NodeCommand(object sender, TreeCommandEventArgs e)
        {
            //int id = Convert.ToInt32(e.Node.NodeID);
            DataSet   ds     = bll.筛选用户(Convert.ToInt32(e.Node.NodeID));
            DataTable dt     = ds.Tables[0].Copy();//复制一份table
            DataTable source = dt;

            // 3.绑定到Grid
            Grid7.DataSource = source;//DataTable
            Grid7.DataBind();

            Grid9.DataSource = source;//DataTable
            Grid9.DataBind();
        }
Ejemplo n.º 4
0
    private void BindGrid7(string SDATE, string EDATE)
    {
        string connectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ToString();

        Ede.Uof.Utility.Data.DatabaseHelper m_db = new Ede.Uof.Utility.Data.DatabaseHelper(connectionString);

        string cmdTxt = @" 
                            SELECT [NAME],CONVERT(nvarchar,[START_TIME],111) AS 'DAYS',[SUBJECT]
                            FROM [UOF].[dbo].[TB_EIP_SCH_WORK], [UOF].[dbo].[TB_EB_USER]

                            WHERE [TB_EB_USER].[USER_GUID]=[TB_EIP_SCH_WORK].[EXECUTE_USER]
                            AND [SUBJECT] LIKE '%拜訪%' 
                            AND CONVERT(nvarchar,[START_TIME],111)>=@SDATE 
                            AND CONVERT(nvarchar,[START_TIME],111)<=@EDATE
                            ORDER BY [NAME],CONVERT(nvarchar,[START_TIME],111) ,[DESCRIPTION]
                        

                        ";

        DateTime SD = Convert.ToDateTime(SDATE);

        SD = SD.AddDays(7);
        DateTime ED = Convert.ToDateTime(EDATE);

        ED = ED.AddDays(7);

        string SSDATE = SD.ToString("yyyy/MM/dd");
        string EEDATE = ED.ToString("yyyy/MM/dd");

        m_db.AddParameter("@SDATE", SSDATE);
        m_db.AddParameter("@EDATE", EEDATE);

        DataTable dt = new DataTable();

        dt.Load(m_db.ExecuteReader(cmdTxt));

        Grid7.DataSource = dt;
        Grid7.DataBind();
    }
Ejemplo n.º 5
0
        private void bindEvaluateTableToGrid()
        {
            string        exception     = "";
            EvaluateTable evaluateTable = new EvaluateTable();
            string        evaluatedID   = Request.QueryString["id"];

            if (EvaluationManagementCtrl.GetEvaluateTable(evaluatedID, ref evaluateTable, ref exception))
            {
                ViewState["KeyWeight"]      = evaluateTable.KeyWeight;
                ViewState["ResponseWeight"] = evaluateTable.KeyWeight;
                ViewState["QualifyWeight"]  = evaluateTable.QualifyWeitht;
                ViewState["AttitudeWeight"] = evaluateTable.AttitudeWeight;
                ViewState["RejectWeight"]   = evaluateTable.RejectWeight;

                Label_EvaluatedName.Text = evaluateTable.EvaluatedName;
                Label_PostName.Text      = evaluateTable.PostName;
                Label_LaborDep.Text      = evaluateTable.LaborDep;
                Label_LaborUnit.Text     = evaluateTable.LaborUnit;
                RadioButtonList_Relation.SelectedValue = Request.QueryString["relation"];
                Label_Period.Text = evaluateTable.StartTime + " ~ " + evaluateTable.StopTime;

                //关键岗位职责指标
                DataTable table1 = new DataTable();
                table1.Columns.Add("Title");
                table1.Columns.Add("Quota");
                foreach (Quota item in evaluateTable.KeyResponse)
                {
                    table1.Rows.Add(item.Title, item.Content[0]);
                }
                Grid1.DataSource = table1;
                Grid1.DataBind();

                //关键岗位胜任能力指标
                DataTable table2 = new DataTable();
                table2.Columns.Add("Title");
                table2.Columns.Add("Quota1");
                table2.Columns.Add("Quota2");
                table2.Columns.Add("Quota3");
                table2.Columns.Add("Quota4");
                foreach (Quota item in evaluateTable.KeyQualify)
                {
                    table2.Rows.Add(item.Title, item.Content[0], item.Content[1], item.Content[2], item.Content[3]);
                }
                Grid2.DataSource = table2;
                Grid2.DataBind();

                //关键岗位工作态度指标
                DataTable table3 = new DataTable();
                table3.Columns.Add("Title");
                table3.Columns.Add("Quota1");
                table3.Columns.Add("Quota2");
                table3.Columns.Add("Quota3");
                table3.Columns.Add("Quota4");
                foreach (Quota item in evaluateTable.KeyAttitude)
                {
                    table3.Rows.Add(item.Title, item.Content[0], item.Content[1], item.Content[2], item.Content[3]);
                }
                Grid3.DataSource = table3;
                Grid3.DataBind();

                //岗位职责指标
                DataTable table4 = new DataTable();
                table4.Columns.Add("Title");
                table4.Columns.Add("Quota");
                foreach (Quota item in evaluateTable.Response)
                {
                    table4.Rows.Add(item.Title, item.Content[0]);
                }
                Grid4.DataSource = table4;
                Grid4.DataBind();

                //岗位胜任能力指标
                DataTable table5 = new DataTable();
                table5.Columns.Add("Title");
                table5.Columns.Add("Quota1");
                table5.Columns.Add("Quota2");
                table5.Columns.Add("Quota3");
                table5.Columns.Add("Quota4");
                foreach (Quota item in evaluateTable.Qualify)
                {
                    table5.Rows.Add(item.Title, item.Content[0], item.Content[1], item.Content[2], item.Content[3]);
                }
                Grid5.DataSource = table5;
                Grid5.DataBind();

                //岗位工作态度指标
                DataTable table6 = new DataTable();
                table6.Columns.Add("Title");
                table6.Columns.Add("Quota1");
                table6.Columns.Add("Quota2");
                table6.Columns.Add("Quota3");
                table6.Columns.Add("Quota4");
                foreach (Quota item in evaluateTable.Attitude)
                {
                    table6.Rows.Add(item.Title, item.Content[0], item.Content[1], item.Content[2], item.Content[3]);
                }
                Grid6.DataSource = table6;
                Grid6.DataBind();

                //否决指标
                DataTable table7 = new DataTable();
                table7.Columns.Add("Title");
                table7.Columns.Add("Quota");
                table7.Rows.Add("严重违反规章制度", "累计旷工3天以上的;\n严重失职,营私舞弊,给本单位造成3000元以上经济损失或者其它严重后果的;\n同时与其他用人单位建立劳动关系,对完成本单位工作任务造成严重影响,或者经本单位提出,拒不改正的;\n违背职业道德,行贿、受贿价值超过3000元以上的;\n被依法追究刑事责任的;");
                table7.Rows.Add(evaluateTable.Reject[0].Title, evaluateTable.Reject[0].Content[0]);
                Grid7.DataSource = table7;
                Grid7.DataBind();
                System.Web.UI.WebControls.DropDownList ddl = Grid7.Rows[1].FindControl("DropDownList_Reject") as System.Web.UI.WebControls.DropDownList;
                ddl.Visible = false;
            }
        }
Ejemplo n.º 6
0
        private void LoadDataList()
        {
            try
            {
                DataSet _DataList = null;
                _DataList = DatabaseManager.Data.DBAccessManager.RetrieveDashBoardDataByEmpID(Int32.Parse(Page.User.Identity.Name.ToString()), Int32.Parse(businessUnitDDList.SelectedValue), Int32.Parse(DivisionLocationList.SelectedValue));

                if (_DataList.Tables.Count > 0)
                {
                    if (_DataList.Tables[0].Rows.Count > 0) // Employee Divisional Chart
                    {
                        DataTable _DataTable = _DataList.Tables[0];
                        Division_EmpListChart(_DataTable);
                    }
                    else
                    {
                        EmpListChart1.Items.Clear();
                    }

                    if (_DataList.Tables[1].Rows.Count > 0) // Employee Location  Chart
                    {
                        DataTable _DataTable = _DataList.Tables[1];
                        Location_EmpListChart(_DataTable);
                    }
                    else
                    {
                        EmpListChart2.Items.Clear();
                    }

                    if (_DataList.Tables[2].Rows.Count > 0) // Employee Age Profile  Chart
                    {
                        DataTable _DataTable = _DataList.Tables[2];
                        AgeProfile_EmpListChart(_DataTable);
                    }
                    else
                    {
                        EmpListChart3.Items.Clear();
                    }

                    if (_DataList.Tables[3].Rows.Count > 0) // Employee Service Profile  Chart
                    {
                        DataTable _DataTable = _DataList.Tables[3];
                        ServiceProfile_EmpListChart(_DataTable);
                    }
                    else
                    {
                        EmpListChart4.Items.Clear();
                    }

                    if (_DataList.Tables[4].Rows.Count > 0) // Expiring Labor Cards in the next 6 months.
                    {
                        DataTable _DataTable = _DataList.Tables[4];
                        Grid3.DataSource = _DataTable;
                        Grid3.DataBind();
                    }
                    else
                    {
                        Grid3.DataSource = null;
                        Grid3.DataBind();
                    }

                    if (_DataList.Tables[5].Rows.Count > 0) // Expiring Visa in the next 6 months.
                    {
                        DataTable _DataTable = _DataList.Tables[5];
                        Grid4.DataSource = _DataTable;
                        Grid4.DataBind();
                    }
                    else
                    {
                        Grid4.DataSource = null;
                        Grid4.DataBind();
                    }


                    if (_DataList.Tables[6].Rows.Count > 0) // Expiring Passports in the next 6 months.
                    {
                        DataTable _DataTable = _DataList.Tables[6];
                        Grid5.DataSource = _DataTable;
                        Grid5.DataBind();
                    }
                    else
                    {
                        Grid5.DataSource = null;
                        Grid5.DataBind();
                    }

                    if (_DataList.Tables[7].Rows.Count > 0) // Pending Leave in the current week.
                    {
                        DataTable _DataTable = _DataList.Tables[7];
                        Grid1.DataSource = _DataTable;
                        Grid1.DataBind();
                    }
                    else
                    {
                        Grid1.DataSource = null;
                        Grid1.DataBind();
                    }


                    if (_DataList.Tables[8].Rows.Count > 0) // Upcoming Holidays
                    {
                        DataTable _DataTable = _DataList.Tables[8];
                        Grid2.DataSource = _DataTable;
                        Grid2.DataBind();
                    }
                    else
                    {
                        Grid2.DataSource = null;
                        Grid2.DataBind();
                    }

                    if (_DataList.Tables[10].Rows.Count > 0) // Upcoming Probation endings
                    {
                        DataTable _DataTable = _DataList.Tables[10];
                        Grid7.DataSource = _DataTable;
                        Grid7.DataBind();
                    }
                    else
                    {
                        Grid7.DataSource = null;
                        Grid7.DataBind();
                    }
                    if (_DataList.Tables[11].Rows.Count > 0) // Business Visa Expiry
                    {
                        DataTable _DataTable = _DataList.Tables[11];
                        Grid10.DataSource = _DataTable;
                        Grid10.DataBind();
                    }
                    else
                    {
                        Grid10.DataSource = null;
                        Grid10.DataBind();
                    }
                }
            }
            catch (Exception exception)
            {
                ErrorLogging.LogError(exception, "Unknown Exception Occured. Please contact support.");
            }
        }
Ejemplo n.º 7
0
        private void LoadDataList()
        {
            try
            {
                DataSet _DataList = null;
                _DataList = DatabaseManager.Data.DBAccessManager.RetrieveDashBoardDataByEmpID(Int32.Parse(Page.User.Identity.Name.ToString()), Int32.Parse(businessUnitDDList.SelectedValue), Int32.Parse(DivisionLocationList.SelectedValue));

                if (_DataList.Tables.Count > 0)
                {
                    if (_DataList.Tables[0].Rows.Count > 0) // Employee Divisional PieChart
                    {
                        PieXML = "";
                        DataTable _DataTable = _DataList.Tables[0];
                        PieXML          = CreatePieGraph1(_DataTable, "Employee Count Breakdown By Business Unit/Dept", "", "Count", "Division/Dept");
                        FCLiteral1.Text = FusionCharts.RenderChartHTML("../FusionCharts/FCF_Pie3D.swf", "", PieXML, "DivisionDeptChart", PieWidth, PieHeight, false);
                    }
                    else
                    {
                        FCLiteral1.Visible = false;
                    }
                    if (_DataList.Tables[1].Rows.Count > 0) // Employee Location PieChart
                    {
                        PieXML = "";
                        DataTable _DataTable = _DataList.Tables[1];
                        PieXML          = CreatePieGraph1(_DataTable, "Employee Count Breakdown By Country", "", "Country", "Count");
                        FCLiteral2.Text = FusionCharts.RenderChartHTML("../FusionCharts/FCF_Pie3D.swf", "", PieXML, "CountryChart", PieWidth, PieHeight, false);
                    }
                    else
                    {
                        FCLiteral2.Visible = false;
                    }
                    if (_DataList.Tables[2].Rows.Count > 0) // Employee Age Profile PieChart
                    {
                        DataTable _DataTable = _DataList.Tables[2];
                        CreateBarGraph1(_DataTable);
                    }
                    else
                    {
                        FCLiteral3.Visible = false;
                    }
                    if (_DataList.Tables[3].Rows.Count > 0) // Employee Service Profile PieChart
                    {
                        PieXML = "";
                        DataTable _DataTable = _DataList.Tables[3];
                        PieXML          = CreatePieGraph1(_DataTable, "Employee Service Year Profile", "", "Count", "Division/Dept");
                        FCLiteral4.Text = FusionCharts.RenderChartHTML("../FusionCharts/FCF_Pie3D.swf", "", PieXML, "ServiceChart", PieWidth, PieHeight, false);
                    }
                    else
                    {
                        FCLiteral4.Visible = false;
                    }

                    if (_DataList.Tables[4].Rows.Count > 0) // Expiring Labor Cards in the next 6 months.
                    {
                        DataTable _DataTable = _DataList.Tables[4];
                        Grid3.DataSource = _DataTable;
                        Grid3.DataBind();
                    }
                    else
                    {
                        Grid3.DataSource = null;
                        Grid3.DataBind();
                    }

                    if (_DataList.Tables[5].Rows.Count > 0) // Expiring Visa in the next 6 months.
                    {
                        DataTable _DataTable = _DataList.Tables[5];
                        Grid4.DataSource = _DataTable;
                        Grid4.DataBind();
                    }
                    else
                    {
                        Grid4.DataSource = null;
                        Grid4.DataBind();
                    }


                    if (_DataList.Tables[6].Rows.Count > 0) // Expiring Passports in the next 6 months.
                    {
                        DataTable _DataTable = _DataList.Tables[6];
                        Grid5.DataSource = _DataTable;
                        Grid5.DataBind();
                    }
                    else
                    {
                        Grid5.DataSource = null;
                        Grid5.DataBind();
                    }

                    if (_DataList.Tables[7].Rows.Count > 0) // Pending Leave in the current week.
                    {
                        DataTable _DataTable = _DataList.Tables[7];
                        Grid1.DataSource = _DataTable;
                        Grid1.DataBind();
                    }
                    else
                    {
                        Grid1.DataSource = null;
                        Grid1.DataBind();
                    }


                    if (_DataList.Tables[8].Rows.Count > 0) // Upcoming Holidays
                    {
                        DataTable _DataTable = _DataList.Tables[8];
                        Grid2.DataSource = _DataTable;
                        Grid2.DataBind();
                    }
                    else
                    {
                        Grid2.DataSource = null;
                        Grid2.DataBind();
                    }

                    if (_DataList.Tables[10].Rows.Count > 0) // Upcoming Probation endings
                    {
                        DataTable _DataTable = _DataList.Tables[10];
                        Grid7.DataSource = _DataTable;
                        Grid7.DataBind();
                    }
                    else
                    {
                        Grid7.DataSource = null;
                        Grid7.DataBind();
                    }
                    if (_DataList.Tables[11].Rows.Count > 0) // Business Visa Expiry
                    {
                        DataTable _DataTable = _DataList.Tables[11];
                        Grid10.DataSource = _DataTable;
                        Grid10.DataBind();
                    }
                    else
                    {
                        Grid10.DataSource = null;
                        Grid10.DataBind();
                    }
                }
            }
            catch (Exception exception)
            {
                ErrorLogging.LogError(exception, "Unknown Exception Occured. Please contact support.");
            }
        }
Ejemplo n.º 8
0
        protected void gridCallBack_Callback(object sender, CallBackEventArgs e)
        {
            hfMessage.Value = "";
            int n = OrgList.SelectedIndex;

            try
            {
                if (e.Parameters[0] != "")
                {
                    if (e.Parameters[1] == "Up")
                    {
                        UpData(e.Parameters[0]);
                    }
                    else if (e.Parameters[1] == "Down")
                    {
                        DownData(e.Parameters[0]);
                    }
                    else
                    {
                        DeleteData(e.Parameters[0]);
                    }
                }
                else if (e.Parameters[0] == "")
                {
                    BindGrid(n);
                }
                if (n == 0)
                {
                    Grid1.RenderControl(e.Output);
                }
                else if (n == 1)
                {
                    Grid2.RenderControl(e.Output);
                }
                else if (n == 2)
                {
                    Grid3.RenderControl(e.Output);
                }
                else if (n == 3)
                {
                    Grid4.RenderControl(e.Output);
                }
                else if (n == 4)
                {
                    Grid5.RenderControl(e.Output);
                }
                else if (n == 5)
                {
                    Grid6.RenderControl(e.Output);
                }
                else if (n == 6)
                {
                    Grid7.RenderControl(e.Output);
                }
                else if (n == 7)
                {
                    Grid8.RenderControl(e.Output);
                }
                else if (n == 8)
                {
                    Grid9.RenderControl(e.Output);
                }
                else if (n == 9)
                {
                    Grid10.RenderControl(e.Output);
                }
                else if (n == 10)
                {
                    Grid11.RenderControl(e.Output);
                }
                else if (n == 11)
                {
                    Grid12.RenderControl(e.Output);
                }
                else if (n == 12)
                {
                    Grid13.RenderControl(e.Output);
                }
                else if (n == 13)
                {
                    Grid14.RenderControl(e.Output);
                }
            }
            catch
            {
                BindGrid(n);
            }

            hfMessage.RenderControl(e.Output);
        }
Ejemplo n.º 9
0
 private void BindGrid(int n)
 {
     if (n == 0)
     {
         EducationLevelBLL      objBLL  = new EducationLevelBLL();
         IList <EducationLevel> objList = objBLL.GetAllEducationLevel();
         Grid1.DataSource = objList;
         Grid1.DataBind();
         Grid1.Visible = true;
         Grid2.Visible = false;
         Grid3.Visible = false;
         Grid4.Visible = false;
         Grid5.Visible = false;
         Grid6.Visible = false;
         Grid7.Visible = false;
         Grid8.Visible = false;
         Grid9.Visible = false;
     }
     if (n == 1)
     {
         PoliticalStatusBLL      objBLL  = new PoliticalStatusBLL();
         IList <PoliticalStatus> objList = objBLL.GetAllPoliticalStatus();
         Grid2.DataSource = objList;
         Grid2.DataBind();
         Grid1.Visible = false;
         Grid2.Visible = true;
         Grid3.Visible = false;
         Grid4.Visible = false;
         Grid5.Visible = false;
         Grid6.Visible = false;
         Grid7.Visible = false;
         Grid8.Visible = false;
         Grid9.Visible = false;
     }
     if (n == 2)
     {
         WorkGroupLeaderLevelBLL      objBLL  = new WorkGroupLeaderLevelBLL();
         IList <WorkGroupLeaderLevel> objList = objBLL.GetAllWorkGroupLeaderLevel();
         Grid3.DataSource = objList;
         Grid3.DataBind();
         Grid1.Visible = false;
         Grid2.Visible = false;
         Grid3.Visible = true;
         Grid4.Visible = false;
         Grid5.Visible = false;
         Grid6.Visible = false;
         Grid7.Visible = false;
         Grid8.Visible = false;
         Grid9.Visible = false;
     }
     if (n == 3)
     {
         TechnicianTypeBLL      objBLL  = new TechnicianTypeBLL();
         IList <TechnicianType> objList = objBLL.GetAllTechnicianType();
         Grid4.DataSource = objList;
         Grid4.DataBind();
         Grid1.Visible = false;
         Grid2.Visible = false;
         Grid3.Visible = false;
         Grid4.Visible = true;
         Grid5.Visible = false;
         Grid6.Visible = false;
         Grid7.Visible = false;
         Grid8.Visible = false;
         Grid9.Visible = false;
     }
     if (n == 4)
     {
         TechnicianTitleTypeBLL      objBLL  = new TechnicianTitleTypeBLL();
         IList <TechnicianTitleType> objList = objBLL.GetAllTechnicianTitleType();
         Grid5.DataSource = objList;
         Grid5.DataBind();
         Grid1.Visible = false;
         Grid2.Visible = false;
         Grid3.Visible = false;
         Grid4.Visible = false;
         Grid5.Visible = true;
         Grid6.Visible = false;
         Grid7.Visible = false;
         Grid8.Visible = false;
         Grid9.Visible = false;
     }
     if (n == 5)
     {
         EducationEmployeeTypeBLL      objBLL  = new EducationEmployeeTypeBLL();
         IList <EducationEmployeeType> objList = objBLL.GetAllEducationEmployeeType();
         Grid6.DataSource = objList;
         Grid6.DataBind();
         Grid1.Visible = false;
         Grid2.Visible = false;
         Grid3.Visible = false;
         Grid4.Visible = false;
         Grid5.Visible = false;
         Grid6.Visible = true;
         Grid7.Visible = false;
         Grid8.Visible = false;
         Grid9.Visible = false;
     }
     if (n == 6)
     {
         CommitteeHeadShipBLL      objBLL  = new CommitteeHeadShipBLL();
         IList <CommitteeHeadShip> objList = objBLL.GetAllCommitteeHeadShip();
         Grid7.DataSource = objList;
         Grid7.DataBind();
         Grid1.Visible = false;
         Grid2.Visible = false;
         Grid3.Visible = false;
         Grid4.Visible = false;
         Grid5.Visible = false;
         Grid6.Visible = false;
         Grid7.Visible = true;
         Grid8.Visible = false;
         Grid9.Visible = false;
     }
     if (n == 7)
     {
         RandomExamModularTypeBLL      objBLL  = new RandomExamModularTypeBLL();
         IList <RandomExamModularType> objList = objBLL.GetAllRandomExamModularType();
         Grid8.DataSource = objList;
         Grid8.DataBind();
         Grid1.Visible = false;
         Grid2.Visible = false;
         Grid3.Visible = false;
         Grid4.Visible = false;
         Grid5.Visible = false;
         Grid6.Visible = false;
         Grid7.Visible = false;
         Grid8.Visible = true;
         Grid9.Visible = false;
     }
     if (n == 8)
     {
         OracleAccess oracle = new OracleAccess();
         DataTable    dt     = oracle.RunSqlDataSet("select * from zj_trainplan_type order by trainplan_type_id").Tables[0];
         Grid9.DataSource = dt;
         Grid9.DataBind();
         Grid1.Visible = false;
         Grid2.Visible = false;
         Grid3.Visible = false;
         Grid4.Visible = false;
         Grid5.Visible = false;
         Grid6.Visible = false;
         Grid7.Visible = false;
         Grid8.Visible = false;
         Grid9.Visible = true;
     }
     if (n == 9)
     {
         OracleAccess oracle = new OracleAccess();
         DataTable    dt     = oracle.RunSqlDataSet("select * from zj_safe_level order by order_index").Tables[0];
         Grid10.DataSource = dt;
         Grid10.DataBind();
         Grid1.Visible  = false;
         Grid2.Visible  = false;
         Grid3.Visible  = false;
         Grid4.Visible  = false;
         Grid5.Visible  = false;
         Grid6.Visible  = false;
         Grid7.Visible  = false;
         Grid8.Visible  = false;
         Grid9.Visible  = false;
         Grid10.Visible = true;
     }
     if (n == 10)
     {
         OracleAccess oracle = new OracleAccess();
         DataTable    dt     = oracle.RunSqlDataSet("select * from zj_certificate order by order_index").Tables[0];
         Grid11.DataSource = dt;
         Grid11.DataBind();
         Grid1.Visible  = false;
         Grid2.Visible  = false;
         Grid3.Visible  = false;
         Grid4.Visible  = false;
         Grid5.Visible  = false;
         Grid6.Visible  = false;
         Grid7.Visible  = false;
         Grid8.Visible  = false;
         Grid9.Visible  = false;
         Grid10.Visible = false;
         Grid11.Visible = true;
     }
     if (n == 11)
     {
         OracleAccess oracle = new OracleAccess();
         DataTable    dt     = oracle.RunSqlDataSet(@"select a.*,b.certificate_name from zj_certificate_level a 
                                               left join zj_certificate b on a.certificate_id=b.certificate_id order by a.order_index").Tables[0];
         Grid12.DataSource = dt;
         Grid12.DataBind();
         Grid1.Visible  = false;
         Grid2.Visible  = false;
         Grid3.Visible  = false;
         Grid4.Visible  = false;
         Grid5.Visible  = false;
         Grid6.Visible  = false;
         Grid7.Visible  = false;
         Grid8.Visible  = false;
         Grid9.Visible  = false;
         Grid10.Visible = false;
         Grid11.Visible = false;
         Grid12.Visible = true;
     }
     if (n == 12)
     {
         OracleAccess oracle = new OracleAccess();
         DataTable    dt     = oracle.RunSqlDataSet(" select * from zj_certificate_unit order by order_index").Tables[0];
         Grid13.DataSource = dt;
         Grid13.DataBind();
         Grid1.Visible  = false;
         Grid2.Visible  = false;
         Grid3.Visible  = false;
         Grid4.Visible  = false;
         Grid5.Visible  = false;
         Grid6.Visible  = false;
         Grid7.Visible  = false;
         Grid8.Visible  = false;
         Grid9.Visible  = false;
         Grid10.Visible = false;
         Grid11.Visible = false;
         Grid12.Visible = false;
         Grid13.Visible = true;
     }
     if (n == 13)
     {
         OracleAccess oracle = new OracleAccess();
         DataTable    dt     = oracle.RunSqlDataSet(" select * from zj_train_unit order by order_index").Tables[0];
         Grid14.DataSource = dt;
         Grid14.DataBind();
         Grid1.Visible  = false;
         Grid2.Visible  = false;
         Grid3.Visible  = false;
         Grid4.Visible  = false;
         Grid5.Visible  = false;
         Grid6.Visible  = false;
         Grid7.Visible  = false;
         Grid8.Visible  = false;
         Grid9.Visible  = false;
         Grid10.Visible = false;
         Grid11.Visible = false;
         Grid12.Visible = false;
         Grid13.Visible = false;
         Grid14.Visible = true;
     }
 }
Ejemplo n.º 10
0
        protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "Action1")
            {
                OffSession();

                string   username = Session["姓名"].ToString();
                object[] keys     = Grid1.DataKeys[e.RowIndex];
                string   职务       = Session["职务"].ToString();
                int      ID       = Convert.ToInt32(keys[0].ToString());//获取ID
                FlowID.Text = ID.ToString();
                School申报审批BLL sbspbll = new School申报审批BLL();
                string        xa      = "";
                string        SID     = keys[1].ToString(); //获取SID
                资产ID.Text = SID;
                string Mark = keys[5].ToString();           //获取FlowName
                FlowName.Text = Mark;
                Sort.Text     = keys[2].ToString();
                #region 报废判断
                if (Mark == "资产处置-报废")
                {
                    int sort = Convert.ToInt32(keys[2]);
                    Sort.Text = sort.ToString();
                    if (sort == 2)
                    {
                        //Button14.Hidden = true;
                        //Button6.Hidden = false;
                    }
                    else
                    {
                        Button2.Hidden = true;
                    }

                    if (keys[11] == null)
                    {
                        原因说明_bfckxq.Text = "";
                    }
                    else
                    {
                        原因说明_bfckxq.Text = keys[11].ToString();
                    }

                    分管领导_bfckxq.Text     = keys[25].ToString();
                    分管领导处理意见_bfckxq.Text = keys[24].ToString();
                    分管领导操作时间_bfckxq.Text = keys[26].ToString();
                    电话_bfckxq.Text       = keys[13].ToString();

                    职务_bfckxq.Text       = keys[13].ToString();
                    事项名称_bfckxq.Text     = keys[17].ToString();
                    主管部门_bfckxq.Text     = keys[29].ToString();
                    主管部门处理意见_bfckxq.Text = keys[27].ToString();

                    主管部门操作时间_bfckxq.Text = keys[28].ToString();
                    财政部门意见_bfckxq.Text   = keys[30].ToString();
                    财政部门_bfckxq.Text     = keys[31].ToString();
                    财政部门操作时间_bfckxq.Text = keys[32].ToString();

                    if (职务 == "分管领导" && sort == 1)
                    {
                        Button15.Hidden = false;
                    }
                    else if (职务 == "主管部门" && sort == 2)
                    {
                        Button15.Hidden = false;
                    }
                    else if (职务 == "财务人员" && sort == 3)
                    {
                        Button15.Hidden = false;
                    }
                    else if (sort == 0)
                    {
                        Button15.Hidden = true;
                    }
                    else
                    {
                        Button15.Hidden = false;
                    }

                    流程状态_abfckxq.Text = keys[3].ToString();
                    单据编号_bfckxq.Text  = keys[4].ToString();
                    float 总数 = 0.0f;
                    float 总价 = 0.0f;
                    总数               = float.Parse(keys[6].ToString());
                    总价               = float.Parse(keys[7].ToString());
                    申报日期_ckxq.Text   = keys[8].ToString();
                    申报单位_bfckxq.Text = keys[9].ToString();
                    申请人_bfckxq.Text  = keys[10].ToString();
                    List <School办公设备信息表> listdata = bll.处置申报查询(SID, keys[5].ToString());

                    Grid7.DataSource = listdata;
                    Grid7.DataBind();

                    Grid8.DataSource = listdata;
                    Grid8.DataBind();
                    JObject summary = new JObject();
                    summary.Add("major", "全部合计");
                    summary.Add("数量_bfckxq", 总数.ToString("F2"));
                    summary.Add("价格_bfckxq", 总价.ToString("F2"));
                    Grid7.SummaryData = summary;
                    Grid8.SummaryData = summary;
                    Window4.Hidden    = false;
                    string zcid = keys[1].ToString();
                    资产ID.Text = zcid;
                }
                #endregion
                #region 调拨
                else if (Mark == "资产处置-调拨")
                {
                    /*
                     * ID(0),SID(1),Sort(2),流程状态(3),单据编号(4),FlowName(5),总数(6),总价(7),申报日期(8),申报单位(9),申请人(10)
                     * ,原因说明(11),职务(12),电话(13),验收日期(14),调入单位(15),调出单位(16),事项名称(17)
                     * ,调出单位分管领导意见(18),调出单位分管领导(19),调出单位分管领导处理时间(20),调入单位管理员意见(21),调入单位管理员(22)
                     * ,调入单位管理员处理时间(23),调入单位分管领导意见(24),调入单位分管领导(25),调入单位分管领导处理时间(26),主管部门意见(27)
                     * ,主管部门处理时间(28),主管部门(29),财政部门意见(30),财政部门(31),财政部门处理时间(32)
                     */
                    Window5.Hidden = false;
                    int sort = Convert.ToInt32(keys[2]);
                    btntanchuang.Text    = "处理";
                    btntanchuang.Enabled = false;
                    if (sort == 1)
                    {
                        //分管领导处理
                        if (职务 == "分管领导")
                        {
                            btntanchuang.Text    = "分管领导处理";
                            btntanchuang.Enabled = true;
                        }
                    }
                    else if (sort == 2)
                    {
                        //资产管理员处理
                        if (职务 == "资产管理员")
                        {
                            btntanchuang.Text    = "资产管理员处理";
                            btntanchuang.Enabled = true;
                        }
                    }
                    //调入单位分管领导
                    else if (sort == 3)
                    {
                        if (职务 == "分管领导")
                        {
                            btntanchuang.Text    = "分管领导处理";
                            btntanchuang.Enabled = true;
                        }
                    }
                    else if (sort == 4)
                    {
                        if (职务 == "主管部门")
                        {
                            btntanchuang.Text    = "主管部门处理";
                            btntanchuang.Enabled = true;
                        }
                    }
                    else if (sort == 5)
                    {
                        if (职务 == "财务人员")
                        {
                            btntanchuang.Text    = "财政部门处理";
                            btntanchuang.Enabled = true;
                        }
                    }
                    else if (sort == 6)
                    {
                        //string aID = Session["ID"].ToString();
                        //int zcczID = Convert.ToInt32(Session["UserID"].ToString());
                        //string fname = sbspbll.资产处置调出单位(zcczID);
                        if (职务 == "资产管理员" && keys[10].ToString() == username)
                        {
                            btntanchuang.Text    = "资产管理员处理";
                            btntanchuang.Enabled = true;
                        }
                    }
                    else if (sort == 7)
                    {
                        //string aID = Session["ID"].ToString();
                        //int zcczID = Convert.ToInt32(Session["UserID"].ToString());
                        //string fname = sbspbll.资产处置调入单位(zcczID);
                        if (职务 == "资产管理员" && keys[22].ToString() == username)
                        {
                            btntanchuang.Text    = "资产管理员处理";
                            btntanchuang.Enabled = true;
                        }
                    }
                    else if (sort == 0)
                    {
                        btntanchuang.Hidden = true;
                    }



                    else
                    {
                        Button2.Hidden = true;
                    }

                    /*
                     *  ID(0),SID(1),Sort(2),流程状态(3),单据编号(4),FlowName(5),总数(6),总价(7),申报日期(8),申报单位(9),申请人(10)
                     * ,原因说明(11),职务(12),电话(13),验收日期(14),调入单位(15),调出单位(16),事项名称(17)
                     * ,调出单位分管领导意见(18),调出单位分管领导(19),调出单位分管领导处理时间(20),调入单位管理员意见(21),调入单位管理员(22)
                     * ,调入单位管理员处理时间(23),调入单位分管领导意见(24),调入单位分管领导(25),调入单位分管领导处理时间(26),主管部门意见(27)
                     * ,主管部门处理时间(28),主管部门(29),财政部门意见(30),财政部门(31),财政部门处理时间(32)
                     */

                    流程状态_dbckxq.Text = keys[3].ToString();
                    单据编号_dbckxq.Text = keys[4].ToString();
                    int 总数 = 0;
                    int 总价 = 0;
                    总数 = Convert.ToInt32(keys[6].ToString());
                    总价 = Convert.ToInt32(keys[7].ToString());
                    申报日期_dbckxq.Text = keys[8].ToString();
                    申请人_dbckxq.Text  = keys[10].ToString();
                    调拨原因说明.Text      = keys[11].ToString();
                    职务_dbckxq.Text   = keys[12].ToString();
                    电话_dbckxq.Text   = keys[13].ToString();
                    验收日期_dbckxq.Text = keys[14].ToString();
                    调入单位_dbckxq.Text = keys[15].ToString();
                    调出单位_dbckxq.Text = keys[16].ToString();
                    事项名称_dbckxq.Text = keys[17].ToString();

                    调出单位分管领导意见.Text   = keys[18].ToString();
                    调出单位分管领导.Text     = keys[19].ToString();
                    调出单位分管领导处理时间.Text = keys[20].ToString();

                    调入单位管理员意见.Text   = keys[21].ToString();
                    调入单位管理员.Text     = keys[22].ToString();
                    调入单位管理员处理时间.Text = keys[23].ToString();

                    调入单位分管领导意见.Text   = keys[24].ToString();
                    调入单位分管领导.Text     = keys[25].ToString();
                    调入单位分管领导处理时间.Text = keys[26].ToString();

                    调拨主管部门意见.Text = keys[27].ToString();
                    主管部门处理时间.Text = keys[28].ToString();
                    主管部门.Text     = keys[29].ToString();

                    调拨财政部门意见.Text = keys[30].ToString();
                    财政部门.Text     = keys[31].ToString();
                    财政部门处理时间.Text = keys[32].ToString();



                    List <School办公设备信息表> listdata = bll.处置申报查询(SID, keys[5].ToString());
                    Grid9.DataSource = listdata;
                    Grid9.DataBind();
                    Grid10.DataSource = listdata;
                    Grid10.DataBind();
                    JObject summary = new JObject();
                    summary.Add("major", "全部合计");
                    summary.Add("数量_db", 总数.ToString("F2"));
                    summary.Add("价格_db", 总价.ToString("F2"));
                    Grid9.SummaryData  = summary;
                    Grid10.SummaryData = summary;
                }
                #endregion
            }
        }
Ejemplo n.º 11
0
        protected void 查看详情_Click(object sender, EventArgs e)
        {
            string FlowID = Request.QueryString["FlowID"];

            if (FlowID != "" && FlowID != null)
            {
                ID = FlowID;
            }
            else
            {
                ID = Request.QueryString["ID"];
            }



            //string ID = Request.QueryString["ID"];

            //string SID = Request.QueryString["SID"];
            Window1.Hidden = false;
            string           SID       = bll.资产处置SID(Convert.ToInt32(ID));
            List <流程进度查看详情表> listdatas = bll.资产处置待报废查看详情(ID, SID);


            流程状态_abfckxq.Text = listdatas[0].流程状态.ToString();
            单据编号_bfckxq.Text  = listdatas[0].单据编号.ToString();
            float 总数 = 0.0f;
            float 总价 = 0.0f;

            总数 = float.Parse(listdatas[0].总数.ToString());
            总价 = float.Parse(listdatas[0].总价.ToString());
            分管领导_bfckxq.Text     = listdatas[0].调入单位分管领导.ToString();
            分管领导处理意见_bfckxq.Text = listdatas[0].调入单位分管领导意见.ToString();
            分管领导操作时间_bfckxq.Text = listdatas[0].调入单位分管领导处理时间.ToString();
            电话_bfckxq.Text       = listdatas[0].电话.ToString();

            职务_bfckxq.Text       = listdatas[0].职务.ToString();
            事项名称_bfckxq.Text     = listdatas[0].事项名称.ToString();
            主管部门_bfckxq.Text     = listdatas[0].主管部门.ToString();
            主管部门处理意见_bfckxq.Text = listdatas[0].主管部门意见.ToString();

            主管部门操作时间_bfckxq.Text = listdatas[0].主管部门处理时间.ToString();
            财政部门意见_bfckxq.Text   = listdatas[0].财政部门意见.ToString();
            财政部门_bfckxq.Text     = listdatas[0].财政部门.ToString();
            财政部门操作时间_bfckxq.Text = listdatas[0].财政部门处理时间.ToString();
            原因说明_bfckxq.Text     = listdatas[0].原因说明.ToString();
            申请人_bfckxq.Text      = listdatas[0].申请人.ToString();
            申报单位_bfckxq.Text     = listdatas[0].申报单位.ToString();
            申报日期_ckxq.Text       = listdatas[0].申报日期.ToString();
            string FlowName = listdatas[0].FlowName.ToString();

            School申报审批BLL        sbspbll  = new School申报审批BLL();
            List <School办公设备信息表> listdata = sbspbll.处置申报查询(SID, FlowName);

            Grid7.DataSource = listdata;
            Grid7.DataBind();
            Grid8.DataSource = listdata;
            Grid8.DataBind();

            JObject summary = new JObject();

            summary.Add("major", "全部合计");
            summary.Add("数量_bfckxq", 总数.ToString("F2"));
            summary.Add("价格_bfckxq", 总价.ToString("F2"));
            Grid7.SummaryData = summary;
            Grid8.SummaryData = summary;
        }