예제 #1
0
    private void BindGrid4()
    {
        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()));

        Grid4.DataSource = dt;
        Grid4.DataBind();
    }
예제 #2
0
        protected void Button4_Click(object sender, EventArgs e)
        {
            School查询办公设备条件表 model = new School查询办公设备条件表();
            string          str部门 = 部门.SelectedText;

            if (str部门 != null)
            {
                model.归属部门 = Convert.ToInt32(部门.SelectedValue);
                if (负责人.SelectedText != null)
                {
                    model.负责人 = Convert.ToInt32(负责人.SelectedValue);
                }
                else
                {
                    model.负责人 = 0;
                    Alert.ShowInTop("必须选择负责人!");
                    return;
                }
            }
            else
            {
                Alert.ShowInTop("必须选择负责人!");
                return;
            }
            model.关键字 = TwinTriggerBox1.Text;
            School资产处置BLL bll    = new School资产处置BLL();
            DataSet       ds     = bll.查询全部资产信息(model);
            DataTable     dt     = ds.Tables[0].Copy();//复制一份table
            DataTable     source = dt;


            // 3.绑定到Grid
            Grid4.DataSource = dt;//DataTable
            Grid4.DataBind();
        }
예제 #3
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);
        }
        protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "Action1")
            {
                object[] keys = Grid1.DataKeys[e.RowIndex];
                int      ID   = Convert.ToInt32(keys[0].ToString());//获取ID
                xx.Text     = ID.ToString();
                查看流程状态.Text = keys[1].ToString();
                if (查看流程状态.Text != "待审核")
                {
                    Button9.Enabled = false;
                    Button3.Enabled = false;
                }
                查看单据编号.Text = keys[2].ToString();
                查看事项名称.Text = keys[3].ToString();
                查看申请人.Text  = keys[4].ToString();
                查看申请日期.Text = keys[5].ToString();
                查看联系方式.Text = keys[6].ToString();

                DataSet   ds = bll.资产转移查看详情(ID);
                DataTable dt = ds.Tables[0].Copy(); //复制一份table
                Grid4.DataSource = dt;              //DataTable
                Grid4.DataBind();
                //查询现负责人等
                SchoolX_资产转移改动信息表 model = bll.查询变更为(ID);
                查看存放地点变更为.Text = model.现存放地点;
                查看归属部门变更为.Text = model.现归属部门;
                查看负责人变更为.Text  = model.现负责人;

                新增资产转移查看详情.Hidden = false;
            }
        }
예제 #5
0
        public void Puzzle1_4DCubeGrid_FindActiveCubesAfterBoot()
        {
            var grid = new Grid4(Input.Day17);

            grid.Boot();

            grid.ActiveCubeCount.Should().Be(1792);
        }
        protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "Action1")
            {
                OffSession();
                string 职务 = Session["职务"].ToString();
                if (职务 == "财务人员")
                {
                    //Button4.Text = "同意";
                    Button6.Text = "拒绝";
                }
                else
                {
                    //Button4.Enabled = false;
                    Button6.Text = "关闭";
                }

                object[] keys = Grid1.DataKeys[e.RowIndex];
                int      ID   = Convert.ToInt32(keys[0].ToString());//获取ID
                flowid.Text = ID.ToString();
                查看流程状态.Text = keys[1].ToString();
                if (查看流程状态.Text == "完成")
                {
                    //Button4.Enabled = false;
                    Button6.Text = "关闭";
                }
                查看单据编号.Text = keys[2].ToString();
                查看事项名称.Text = keys[3].ToString();
                查看申请人.Text  = keys[4].ToString();
                查看申请日期.Text = keys[5].ToString();
                查看记账人.Text  = keys[6].ToString();
                //赋值lable
                this.Label5.Text = "数量合计:" + keys[7].ToString() + "---金额合计:" + keys[8].ToString() + "元";
                查看变动方式.Text      = keys[9].ToString();
                查看变动原因.Text      = keys[10].ToString();
                查看记账人意见.Text     = keys[11].ToString();
                查看备注.Text        = keys[12].ToString();
                string 资产ID    = keys[13].ToString();
                string str变动金额 = keys[14].ToString();
                if (keys[15] == null)
                {
                    int Sort = 0;
                }
                else
                {
                    int Sort = Convert.ToInt32(keys[15].ToString());
                }


                //通过ID查询资产数据
                Grid4.DataSource = bll.原值变动查看详情(资产ID);
                Grid4.DataBind();

                Window3.Hidden = false;
            }
        }
예제 #7
0
        /// <summary>
        ///     点击任务单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Grid3_RowClick(object sender, GridRowClickEventArgs e)
        {
            //IEnumerable<string> selectIds = GetDispatchCenterIds();

            try
            {
                if (Grid3.SelectedRowIndexArray.Length == 0)
                {
                    Alert.Show("请至少选择一项!", MessageBoxIcon.Information);
                }
                else if (Grid3.SelectedRowIndexArray.Length > 1)
                {
                    Alert.Show("只能选择一项!", MessageBoxIcon.Information);
                }
                else
                {
                    string sid = Grid3.DataKeys[Grid3.SelectedRowIndexArray[0]][0].ToString();

                    //根据调度单号查询任务单

                    var parms = new Dictionary <string, object>();

                    parms.Clear();
                    parms.Add("@KeyId", sid);
                    parms.Add("@FCompanyId", CurrentUser.AccountComId);

                    var data   = SqlService.ExecuteProcedureCommand("proc_DispatchDetails", parms).Tables[0];
                    var bottle = SqlService.ExecuteProcedureCommand("rpt_SalesBottles", parms).Tables[0];
                    if (data.Rows.Count > 0)
                    {
                        //绑定数据源
                        Grid1.DataSource = data;
                        Grid1.DataBind();
                    }
                    if (bottle.Rows.Count > 0)
                    {
                        //绑定数据源
                        Grid4.DataSource = bottle;
                        Grid4.DataBind();

                        var summary = new JObject
                        {
                            { "FBottle", "合计" },
                            { "FBottleQty", bottle.Compute("sum(FBottleQty)", "true").ToString() },
                        };

                        Grid4.SummaryData = summary;
                    }
                }
            }
            catch (Exception ex)
            {
                Alert.Show("查看失败!", MessageBoxIcon.Warning);
            }
        }
예제 #8
0
        protected void TabStrip1_TabIndexChanged(object sender, EventArgs e)
        {
            if (TabStrip1.ActiveTabIndex == 0)
            {
            }
            else if (TabStrip1.ActiveTabIndex == 1)
            {
                //查询关联备件
                string sbmc       = "";
                int    所属单位       = 0;
                int[]  selections = Grid1.SelectedRowIndexArray;
                foreach (int rowIndex in selections)
                {
                    sbmc = Grid1.DataKeys[rowIndex][4].ToString();
                    所属单位 = Convert.ToInt16(Grid1.DataKeys[rowIndex][10]);
                }
                Grid2.DataSource = bll.设备名称关联备件(sbmc, 所属单位);
                Grid2.DataBind();
            }
            else if (TabStrip1.ActiveTabIndex == 2)
            {
                //维修情况
                //string sbbh = "";
                //int[] selections = Grid1.SelectedRowIndexArray;
                //foreach (int rowIndex in selections)
                //{
                //    sbbh = Grid1.DataKeys[rowIndex][3].ToString();
                //}
                Grid3.DataSource = bll.设备编号关联维修情况(设备编号.Text);
                Grid3.DataBind();
            }
            else if (TabStrip1.ActiveTabIndex == 3)
            {
                //设备BOM
            }
            else if (TabStrip1.ActiveTabIndex == 4)
            {
                //备件消耗
                Grid4.DataSource = bll.设备编号查询备件消耗(设备编号.Text);
                Grid4.DataBind();
            }
            else if (TabStrip1.ActiveTabIndex == 5)
            {
                //预防性维修
                string sbbc = 设备名称.Text;

                //text.Text = bll.查询单台设备平均故障时间("999-1252", "喷枪");
                List <预防性维修> listmodel = bll.查询设备平均故障时间(sbbc);
                Grid5.DataSource = listmodel;
                Grid5.DataBind();

                //List<预防性维修> listmodel = bll.查询设备平均故障时间("车体喷砂系统");
            }
        }
예제 #9
0
 public void LoadOrderDep01(string ORDDER_ID)
 {
     if (String.IsNullOrEmpty(ORDDER_ID))
     {
         Grid4.DataSource = null;
         Grid5.DataSource = null;
         Grid4.DataBind();
         Grid5.DataBind();
     }
     ORDER_DEP01Bll.GetInstence().BandGrid(this, Grid4, 1, ORDDER_ID);
     ORDER_DEP01Bll.GetInstence().BandGrid(this, Grid5, 2, ORDDER_ID);
 }
예제 #10
0
        protected void btnIcon1_Click(object sender, EventArgs e)
        {
            School资产处置BLL bll    = new School资产处置BLL();
            DataSet       ds     = bll.查询全部资产信息();
            DataTable     dt     = ds.Tables[0].Copy();//复制一份table
            DataTable     source = dt;


            // 3.绑定到Grid
            Grid4.DataSource = dt;//DataTable
            Grid4.DataBind();
            //绑定条件
            School清查盘点BLL pdbll = new School清查盘点BLL();

            List <School一级部门表> xxmc = pdbll.查询一级部门();

            部门.DataTextField  = "名称";
            部门.DataValueField = "ID";
            部门.DataSource     = xxmc;
            部门.DataBind();

            List <School一级类别表> yjlb = pdbll.查询一级类别();

            一级.DataTextField  = "名称";
            一级.DataValueField = "ID";
            一级.DataSource     = yjlb;
            一级.DataBind();


            List <School建筑物信息表> 查询建筑物 = pdbll.查询建筑物信息表();

            存放地点.DataTextField  = "名称";
            存放地点.DataValueField = "ID";
            存放地点.DataSource     = 查询建筑物;
            存放地点.DataBind();


            二级.Enabled  = false;
            级.Enabled   = false;
            负责人.Enabled = false;
            房间.Enabled  = false;

            二级.EmptyText  = "全部";
            级.EmptyText   = "全部";
            负责人.EmptyText = "全部";
            房间.EmptyText  = "全部";



            Window2.Hidden = false;
        }
예제 #11
0
        /// <summary>
        ///
        /// </summary>
        private void BindDataGrid()
        {
            var source = SqlService.Where(string.Format(@"SELECT * FROM dbo.vm_SalesDetails WHERE keyId='{0}' and FCompanyId={1}", txtKeyId.Text, CurrentUser.AccountComId));

            //绑定数据源
            Grid1.DataSource = source.Tables[0];
            Grid1.DataBind();


            //----------------------------------------------------------
            var dataStatus = SqlService.Where(string.Format(@"SELECT FId
      ,KeyId
      ,a.FCompanyId
      ,FDeptId
      ,b.org_name FDeptName
      ,FOperator
      ,FDate
      ,FActionName
      ,FMemo
  FROM dbo.LHBillStatus a
  LEFT JOIN dbo.base_orgnization b ON a.FDeptId=b.id WHERE KeyId='{0}' and a.FCompanyId={1}", txtKeyId.Text, CurrentUser.AccountComId));

            //绑定数据源
            Grid2.DataSource = dataStatus;
            Grid2.DataBind();
            //----------------------------------------------------------
            var dataFlow = SqlService.Where(string.Format(@"SELECT FId
      ,KeyId
      ,a.FCompanyId
      ,FDeptId
      ,b.org_name FDeptName
      ,FOperator
      ,FDate
      ,FMemo
  FROM dbo.LHBillFlow a
  LEFT JOIN dbo.base_orgnization b ON a.FDeptId=b.id WHERE KeyId='{0}' and a.FCompanyId={1}", txtKeyId.Text, CurrentUser.AccountComId));

            //绑定数据源
            Grid3.DataSource = dataFlow;
            Grid3.DataBind();
            //----------------------------------------------------------

            var log = SqlService.Where(string.Format(@"SELECT * FROM dbo.vm_SalesDetailsLog a WHERE keyId='{0}' and a.FCompanyId={1}", txtKeyId.Text, CurrentUser.AccountComId));

            //绑定数据源
            Grid4.DataSource = log;
            Grid4.DataBind();
        }
예제 #12
0
    protected void LoadREVGrid(string mode)
    {
        SQL_utils sql = new SQL_utils("backend");

        GridView  gv       = new GridView();
        DataTable dt_stack = new DataTable();

        dt_stack = sql.DataTable_from_SQLstring("select * from fin.vwREV_FutureMo_with_TOTALS_by_budgetNbr  where budgetNbr in ( '" + utilSelect2.getselected_CSVval(selBudgets, "','") + "') " +
                                                " order by  budgetnbr, mos_from_now");


        if (dt_stack.Rows.Count >= 1)
        {
            DataTable dt_stack_pivot = utilsPivot.Pivot(dt_stack, new string[] { "budgetName", "budgetNbr", "EndDate" }, "mos_from_now", "calcREV");
            string[]  mos            = new string[12];

            for (int i = 0; i < 12; i++)
            {
                var myDate       = DateTime.Now;
                var startOfMonth = new DateTime(myDate.Year, myDate.Month, 1);
                var endOfMonth   = startOfMonth.AddMonths(1).AddDays(-1);
                //That should give you what you need. int lastDay = DateTime.DaysInMonth (2014, 2); and the first day is always 1.


                string prefix = (i < 9) ? "0" : "";
                mos[i] = String.Format("{0:d}", startOfMonth.AddMonths(i));
                //            mos[i] = String.Format("{0:d}", dt_stack_pivot.Columns[i + 2].ColumnName);
                dt_stack_pivot.Columns[i + num_cols_before_REV].ColumnName = "mo" + prefix + (i + 1).ToString();
            }


            Grid4.DataSource = dt_stack_pivot;
            Grid4.DataBind();

            //Set the HeaderText to the month
            for (int m = 0; m < 12; m++)
            {
                Grid4.Columns[num_cols_before_REV + m].HeaderText = mos[m];
            }
            lblError.Text = "";
        }
        else
        {
            lblError.Text = "No records returned.";
            Grid4.Visible = false;
        }
    }
        /// <summary>
        /// 列表按键绑定——修改列表控件属性
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Grid4_PreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            int rowc = Grid4.Rows.Count;

            int id = ConvertHelper.Cint0(hidId.Text);//获取页面传值

            Solution.DataAccess.Model.Position model = new DataAccess.Model.Position();
            //获取指定ID的菜单内容,如果不存在,则创建一个菜单实体
            model = PositionBll.GetInstence().GetModelForCache(x => x.Id == id);

            GridRow gr1 = Grid3.Rows[Grid3.SelectedRowIndex];

            menuInfoId_ = int.Parse(gr1.Values[0].ToString());

            if (model == null)
            {
                return;
            }
            //绑定是否显示状态列
            if (menuInfoId_ != 0)
            {
                int         o   = e.RowIndex;
                DataRowView row = e.DataItem as DataRowView;

                string _ControlPower = model.ControlPower;// PositionBll.GetInstence().GetFieldValue(id, "ControlPower", true).ToString();

                //   GridRow gr = Grid4.Rows[o];

                string str = ((System.Data.DataRowView)(row)).Row.Table.Rows[e.RowIndex][0].ToString();
                string s   = "," + menuInfoId_.ToString() + "|" + str + ",";

                if (_ControlPower.IndexOf("," + menuInfoId_.ToString() + "|" + str + ",") >= 0)
                {
                    var lbf = Grid4.FindColumn("IsOrNotLink") as LinkButtonField;
                    lbf.Icon            = Icon.BulletTick;
                    lbf.CommandArgument = "0";
                }
                else
                {
                    var lbf = Grid4.FindColumn("IsOrNotLink") as LinkButtonField;
                    lbf.Icon            = Icon.BulletCross;
                    lbf.CommandArgument = "1";
                }
            }
        }
예제 #14
0
파일: Solver.cs 프로젝트: nitell/AoC2020
        public string Solve2()
        {
            var grid  = new Grid4();
            var lines = File.ReadAllLines(@"Day17\input.txt").ToArray();

            for (int y = 0; y < lines.Length; y++)
            {
                for (int x = 0; x < lines[y].Length; x++)
                {
                    if (lines[y][x] == '#')
                    {
                        grid.SetActive(x, y, 0, 0);
                    }
                }
            }

            for (int step = 1; step <= 6; step++)
            {
                grid.Step();
                //Console.WriteLine($"After {step} cycles");
                //for (var z = grid.Coordinates.Select(o => o.Z).Min(); z <= grid.Coordinates.Select(o => o.Z).Max(); z++)
                //{
                //    Console.WriteLine($"z={z}");
                //    for (var y = grid.Coordinates.Select(o => o.Y).Min(); y <= grid.Coordinates.Select(o => o.Y).Max(); y++)
                //    {
                //        for (var x = grid.Coordinates.Select(o => o.X).Min(); x <= grid.Coordinates.Select(o => o.X).Max(); x++)
                //        {
                //            Console.Write(grid.Coordinates.Contains(new Coordinate(x, y, z)) ? "#" : ".");
                //        }
                //        Console.WriteLine();
                //    }
                //    Console.WriteLine();
                //    Console.WriteLine();
                //}
            }
            return(grid.ActiveCount.ToString());
        }
예제 #15
0
        private void BindGrid4()
        {
            using (var appdb = new AppContext())
            {
                var q = from a in appdb.orderdetail
                        join b in appdb.orderheader on a.FSN equals b.SN
                        select a;

                string searchText = ddlOrderno.Text;
                if (!String.IsNullOrEmpty(searchText))
                {
                    q = q.Where(u => u.ItemName.Contains(searchText) || u.ItemNo.Contains(searchText) || u.ClinetNo.Contains(searchText) || u.OrderNo.Contains(searchText));;
                }

                // 在查询添加之后,排序和分页之前获取总记录数
                Grid4.RecordCount = q.Count();

                // 排列和分页
                //q = SortAndPage<Provider>(q, Grid4);

                Grid4.DataSource = q;
                Grid4.DataBind();
            }
        }
예제 #16
0
        /// <summary>
        ///
        /// </summary>
        private void BindDataGrid()
        {
            var source = SqlService.Where(string.Format(@"SELECT * FROM dbo.vm_LeaseReturnDetails a WHERE keyId='{0}' and FCompanyId={1}", lblKeyId.Text, CurrentUser.AccountComId));

            //绑定数据源
            Grid1.DataSource = source;
            Grid1.DataBind();

            var table = source.Tables[0];

            if (table != null && table.Rows.Count > 0)
            {
                decimal sumFQty    = 0.00M;
                decimal sumFAmount = 0.00M;

                for (int i = 0; i < table.Rows.Count; i++)
                {
                    sumFQty    += Convert.ToDecimal(table.Rows[i]["FBottleQty"]);
                    sumFAmount += Convert.ToDecimal(table.Rows[i]["FDepositSecurity"]);
                }

                var summary = new JObject
                {
                    { "FBottle", "合计" },
                    { "FBottleQty", sumFQty },
                    { "FDepositSecurity", sumFAmount }
                };

                Grid1.SummaryData = summary;
            }

            //----------------------------------------------------------
            var dataStatus = SqlService.Where(string.Format(@"SELECT FId
      ,KeyId
      ,a.FCompanyId
      ,FDeptId
      ,b.org_name FDeptName
      ,FOperator
      ,FDate
      ,FActionName
      ,FMemo
  FROM dbo.LHBillStatus a
  LEFT JOIN dbo.base_orgnization b ON a.FDeptId=b.id WHERE KeyId='{0}' and a.FCompanyId={1}", lblKeyId.Text, CurrentUser.AccountComId));

            //绑定数据源
            Grid2.DataSource = dataStatus;
            Grid2.DataBind();
            //----------------------------------------------------------
            var dataFlow = SqlService.Where(string.Format(@"SELECT FId
      ,KeyId
      ,a.FCompanyId
      ,FDeptId
      ,b.org_name FDeptName
      ,FOperator
      ,FDate
      ,FMemo
  FROM dbo.LHBillFlow a
  LEFT JOIN dbo.base_orgnization b ON a.FDeptId=b.id WHERE KeyId='{0}' and a.FCompanyId={1}", lblKeyId.Text, CurrentUser.AccountComId));

            //绑定数据源
            Grid3.DataSource = dataFlow;
            Grid3.DataBind();
            //----------------------------------------------------------

            var log = SqlService.Where(string.Format(@"SELECT * FROM dbo.vm_LeaseReturnDetailsLog a WHERE keyId='{0}' and FCompanyId={1}", lblKeyId.Text, CurrentUser.AccountComId));

            //绑定数据源
            Grid4.DataSource = log;
            Grid4.DataBind();
        }
예제 #17
0
        protected void Button4_Click(object sender, EventArgs e)
        {
            School查询办公设备条件表 model = new School查询办公设备条件表();
            string          str一级 = 一级.SelectedText;
            string          str二级 = 二级.SelectedText;
            string          str三级 = 级.SelectedText;

            if (str一级 == "全部" || str一级 == null)
            {
                str一级 = "";
            }
            if (str二级 == "全部" || str二级 == null)
            {
                str二级 = "";
            }
            if (str三级 == "全部" || str三级 == null)
            {
                str三级 = "";
            }
            model.一级分类 = str一级;
            model.二级分类 = str二级;
            model.级分类  = str三级;
            string str部门 = 部门.SelectedText;

            if (str部门 != "全部" && str部门 != null)
            {
                model.归属部门 = Convert.ToInt32(部门.SelectedValue);
                if (负责人.SelectedText != null)
                {
                    model.负责人 = Convert.ToInt32(负责人.SelectedValue);
                }
                else
                {
                    model.负责人 = 0;
                }
            }
            else
            {
                model.归属部门 = 0;
            }

            if (存放地点.SelectedText != null)
            {
                model.存放地点 = Convert.ToInt32(存放地点.SelectedValue);
                if (房间.SelectedText != null)
                {
                    model.房间 = Convert.ToInt32(房间.SelectedValue);
                }
                else
                {
                    model.房间 = 0;
                }
            }
            else
            {
                model.存放地点 = 0;
            }

            if (起始投入日期.Text != "")
            {
                model.起始投入日期 = Convert.ToDateTime(起始投入日期.Text).ToShortDateString();
            }
            else
            {
                model.起始投入日期 = "";
            }
            if (结束投入日期.Text != "")
            {
                model.结束投入日期 = Convert.ToDateTime(结束投入日期.Text).ToShortDateString();
            }
            else
            {
                model.结束投入日期 = "";
            }


            model.关键字 = TwinTriggerBox1.Text;

            School资产处置BLL bll    = new School资产处置BLL();
            DataSet       ds     = bll.查询全部资产信息(model);
            DataTable     dt     = ds.Tables[0].Copy();//复制一份table
            DataTable     source = dt;


            // 3.绑定到Grid
            Grid4.DataSource = dt;//DataTable
            Grid4.DataBind();

            //二级.Enabled = false;
            //三级.Enabled = false;
            //负责人.Enabled = false;
            //房间.Enabled = false;

            二级.EmptyText  = "全部";
            级.EmptyText   = "全部";
            负责人.EmptyText = "全部";
            房间.EmptyText  = "全部";
        }
예제 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataSet   ds     = bll.首页_X_资产报修流程表("全部");
                DataTable dt     = ds.Tables[0].Copy();//复制一份table
                DataTable source = dt;

                // 3.绑定到Grid
                Grid1.DataSource = dt;//DataTable
                Grid1.DataBind();
                DateTime dtime = DateTime.Now;
                string   sj    = dtime.Year + "-" + dtime.Month + "-" + dtime.Day;
                报修时间2.EmptyText       = sj;
                DatePicker1.EmptyText = sj;
                完成时间.EmptyText        = sj;
                List <School房间信息表> cfdd = bll.cfdd();
                报修地址.DataTextField  = "名称";
                报修地址.DataValueField = "ID";
                报修地址.DataSource     = cfdd;
                报修地址.DataBind();

                //DatePicker1.MinDate = DateTime.Now;
                //DatePicker1.MaxDate = DateTime.Now.AddDays(10);


                // 3.绑定到Grid
                Grid4.DataSource = dt;//DataTable
                Grid4.DataBind();
                //绑定条件
                School清查盘点BLL pdbll = new School清查盘点BLL();

                List <School一级部门表> xxmc = pdbll.查询一级部门();
                部门.DataTextField  = "名称";
                部门.DataValueField = "ID";
                部门.DataSource     = xxmc;
                部门.DataBind();

                List <School一级类别表> yjlb = pdbll.查询一级类别();
                一级.DataTextField  = "名称";
                一级.DataValueField = "ID";
                一级.DataSource     = yjlb;
                一级.DataBind();


                List <School建筑物信息表> 查询建筑物 = pdbll.查询建筑物信息表();
                存放地点.DataTextField  = "名称";
                存放地点.DataValueField = "ID";
                存放地点.DataSource     = 查询建筑物;
                存放地点.DataBind();


                二级.Enabled  = false;
                级.Enabled   = false;
                负责人.Enabled = false;
                房间.Enabled  = false;

                二级.EmptyText  = "全部";
                级.EmptyText   = "全部";
                负责人.EmptyText = "全部";
                房间.EmptyText  = "全部";
                OffSession();
                string 职务 = HttpContext.Current.Session["职务"].ToString();
                联系电话.Text = HttpContext.Current.Session["电话号码"].ToString();
                if (职务 == "资产管理员")
                {
                    Button1.Hidden = false;
                }
            }
        }
예제 #19
0
    /// <summary>
    /// 顯示時欄位初始值
    /// </summary>
    /// <param name="versionField">欄位集合</param>
    public override void SetField(Fast.EB.WKF.Design.VersionField versionField)
    {
        FieldOptional fieldOptional = versionField as FieldOptional;

        if (fieldOptional != null)
        {
            #region ==============屬性說明==============『』
            //fieldOptional.IsRequiredField『是否為必填欄位,如果是必填(True),如果不是必填(False)』
            //fieldOptional.DisplayOnly『是否為純顯示,如果是(True),如果不是(False),一般在觀看表單及列印表單時,屬性為True』
            //fieldOptional.HasAuthority『是否有填寫權限,如果有填寫權限(True),如果沒有填寫權限(False)』
            //fieldOptional.FieldValue『如果已有人填寫過欄位,則此屬性為記錄其內容』
            //fieldOptional.FieldDefault『如果欄位有預設值,則此屬性為記錄其內容』
            //fieldOptional.FieldModify『是否允許修改,如果允許(fieldOptional.FieldModify=FieldModifyType.yes),如果不允許(fieldOptional.FieldModify=FieldModifyType.no)』
            //fieldOptional.Modifier『如果欄位有被修改過,則Modifier的內容為EBUser,如果沒有被修改過,則會等於Null』
            #endregion
            if (fieldOptional.FieldMode == FieldMode.View || fieldOptional.FieldMode == FieldMode.Print)
            {
                SqlConnection con = new SqlConnection();
                DataTable     dt  = new DataTable("CURRENT");
                try
                {
                    con.ConnectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ToString();
                    SqlDataAdapter da = new SqlDataAdapter("select CURRENT_DOC,TASK_RESULT,DOC_NBR,BEGIN_TIME from [UOF].[dbo].[TB_WKF_TASK] where TASK_ID = @TASK_ID", con);
                    da.SelectCommand.Parameters.Add("TASK_ID", SqlDbType.NVarChar).Value = Request.QueryString["TASK_ID"].ToString();
                    da.Fill(dt);
                }
                finally
                {
                    con.Close();
                }

                //string url = Request.Url.AbsoluteUri;
                txtFieldValue.Text = dt.Rows[0][0].ToString();
                result             = dt.Rows[0]["TASK_RESULT"].ToString();
                DOC_NBR            = dt.Rows[0]["DOC_NBR"].ToString();
                BEGIN_TIME         = dt.Rows[0]["BEGIN_TIME"].ToString();
                //Response.Write("<script>alert('" + dt.Rows[0][0].ToString() + "')</script>");
                Grid4.DataSource = BindGrid4();
                Grid4.DataBind();
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(txtFieldValue.Text);
                XmlNodeList last         = xmlDoc.SelectNodes("/Form/FormFieldValue/FieldItem");
                int         lastcount    = last.Count;
                int         xmllistcount = 1;
                foreach (XmlNode nd in last)
                {
                    if (xmllistcount == lastcount)
                    {
                        if (result == "0" && (nd.Attributes["ConditionValue"].Value == "" || nd.Attributes["ConditionValue"].Value == "0"))
                        {
                            XmlNodeList DELlast = xmlDoc.SelectNodes("/Form/FormFieldValue/FieldItem/FieldValue/Item/DEL"); //有此節點則是代表此表單作廢
                            if (DELlast.Count == 0)
                            {
                                resend.Enabled = btnDel.Enabled = true;
                            }
                            else
                            {
                                resend.Visible = btnDel.Visible = false;
                            }
                        }
                    }
                    xmllistcount++;
                }
            }
            #region ==============如果有修改,要顯示修改者資訊==============
            if (fieldOptional.Modifier != null)
            {
                lblModifier.Visible   = true;
                lblModifier.ForeColor = System.Drawing.Color.Red;
                lblModifier.Text      = String.Format("( {0}:{1} )", this.lblMsgSigner.Text, fieldOptional.Modifier.Name);
            }
            #endregion
        }
    }
예제 #20
0
 protected void Grid4_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     Grid4.DataSource = BindGrid4();
     Grid4.DataBind();
 }
예제 #21
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;
            }
        }
예제 #22
0
        //确认申报
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (类别.SelectedValue.ToString() == "待报废")
            {
                if (类别.SelectedValue.ToString() == "待报废")
                {
                    OffSession();
                    string     职务         = Session["职务"].ToString();
                    List <int> intlist    = new List <int>();
                    int[]      selections = Grid2.SelectedRowIndexArray;
                    Console.Write(selections.Length);
                    if (selections.Length == 0)
                    {
                        Alert.Show("请选择");
                    }
                    else
                    {
                        Window2.Hidden = false;
                        Console.Write(selections);
                        foreach (int rowIndex in selections)
                        {
                            int ID = Convert.ToInt32(Grid2.DataKeys[rowIndex][0]);
                            intlist.Add(ID);
                        }
                        List <School办公设备信息表> listdata = bll.资产申报确定设备(intlist, 类别.SelectedValue);
                        string flowstate = 类别.SelectedValue;
                        //int 总数 = 0;
                        //int 总价 = 0;
                        float 总数 = 0.0f;
                        float 总价 = 0.0f;
                        if (listdata != null)
                        {
                            foreach (School办公设备信息表 itemjj in listdata)
                            {
                                总数 += itemjj.数量;
                                总价 += Convert.ToInt32(itemjj.价格);
                            }
                        }
                        Grid3.DataSource = listdata;//DataTable
                        Grid3.DataBind();

                        Grid4.DataSource = listdata;//DataTable
                        Grid4.DataBind();
                        JObject summary = new JObject();
                        //summary.Add("major", "全部合计");
                        summary.Add("数量", 总数.ToString("F2"));
                        summary.Add("价格", 总价.ToString("F2"));

                        Grid3.SummaryData = summary;
                        Grid4.SummaryData = summary;
                        //Grid7.SummaryData = summary;
                        //Grid8.SummaryData = summary;
                        //待报废Grid3
                        报废流程状态.Text     = "待审核";
                        报废流程状态.Enabled  = false;
                        报废_申报单位.Text    = Session["二级部门名称"].ToString();
                        报废_申报单位.Enabled = false;
                        报废_申报日期.Text    = DateTime.Now.ToShortDateString();
                        报废单据编号.Text     = SchoolUtility.strbumber("ZCCZBF");;
                        报废单据编号.Enabled  = false;
                        报废_申请人.Text     = HttpContext.Current.Session["姓名"].ToString();
                        报废_申请人.Enabled  = false;

                        报废_职务.Text    = 职务;
                        报废_职务.Enabled = false;
                    }
                }
            }
            else if (类别.SelectedValue.ToString() == "待调拨")
            {
                OffSession();
                string 职务 = Session["职务"].ToString();
                if (职务 == "资产管理员")
                {
                    School清查盘点BLL      pdbll = new School清查盘点BLL();
                    List <School一级部门表> xxmc  = SchoolUtility.查询一级部门不带全部();;
                    调拨调入单位.DataTextField  = "名称";
                    调拨调入单位.DataValueField = "ID";
                    调拨调入单位.DataSource     = xxmc;
                    调拨调入单位.DataBind();

                    List <int> intlist    = new List <int>();
                    int[]      selections = Grid2.SelectedRowIndexArray;
                    if (selections.Length == 0)
                    {
                        Alert.Show("请选择");
                    }
                    else
                    {
                        Window3.Hidden = false;
                        foreach (int rowIndex in selections)
                        {
                            int ID = Convert.ToInt32(Grid2.DataKeys[rowIndex][0]);
                            intlist.Add(ID);
                        }
                        List <School办公设备信息表> listdata = bll.资产申报确定设备(intlist, 类别.SelectedValue);
                        string flowstate = 类别.SelectedValue;
                        Grid5.DataSource = listdata;//DataTable
                        Grid5.DataBind();

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


                        //当前用户部门是调出单位  调入单位操作人选填
                        调拨流程状态.Text    = "待审核";
                        调拨流程状态.Enabled = false;
                        调拨调出单位.Text    = Session["二级部门名称"].ToString();
                        调拨调出单位.Enabled = false;
                        调拨申报日期.Text    = DateTime.Now.ToShortDateString();
                        调拨验收日期.Text    = DateTime.Now.ToShortDateString();

                        DateTime dt = DateTime.Now;
                        string   y  = dt.Year.ToString();
                        string   m  = dt.Month.ToString();
                        string   d  = dt.Day.ToString();
                        string   h  = dt.Hour.ToString();
                        string   mm = dt.Minute.ToString();
                        调拨单据编号.Text    = SchoolUtility.strbumber("ZCCZDB");
                        调拨单据编号.Enabled = false;
                        调拨_申请人.Text    = HttpContext.Current.Session["姓名"].ToString();
                        调拨_申请人.Enabled = false;
                        调拨职务.Enabled   = false;
                        调拨电话.Enabled   = false;
                        调拨职务.Text      = HttpContext.Current.Session["职务"].ToString();
                        try
                        {
                            调拨电话.Text = HttpContext.Current.Session["联系电话"].ToString();
                        }
                        catch (Exception)
                        {
                            调拨电话.Text = "";
                        }
                    }
                }
                else
                {
                    Alert.Show("您没有资产处置-调拨处理的权限,请联系资产管理员", MessageBoxIcon.Warning);
                }
            }
        }
예제 #23
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;
     }
 }
예제 #24
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);
        }
예제 #25
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.");
            }
        }
예제 #26
0
        protected void TabStrip2_TabIndexChanged(object sender, EventArgs e)
        {
            if (TabStrip2.ActiveTabIndex == 0)
            {
            }
            else if (TabStrip2.ActiveTabIndex == 1)
            {
                //查询 拍照补录
                // 1.获取数据总数
                // Grid3.RecordCount = 700;//测试,去数据库获取总数
                // 2.获取当前分页数据

                DataSet   ds     = bll.拍照补录查询("");
                DataTable dt     = ds.Tables[0].Copy();//复制一份table
                DataTable source = dt;
                // 3.绑定到Grid
                Grid3.DataSource = source;//DataTable
                Grid3.DataBind();
            }
            else if (TabStrip2.ActiveTabIndex == 2)
            {
                DataSet   dspk = bll.盘亏处理查询("");
                DataTable dtpk = dspk.Tables[0].Copy(); //复制一份table
                Grid4.DataSource = dtpk;                //DataTable
                Grid4.DataBind();
            }
            else if (TabStrip2.ActiveTabIndex == 3)
            {
                //Grid5
                Grid5.DataSource = bll.查询盘点报告();//DataTable
                Grid5.DataBind();
                //绑定条件数据

                List <School学校名称表> xxmc = bll.查询学校名称();
                单位.DataTextField  = "学校名称";
                单位.DataValueField = "ID";
                单位.DataSource     = xxmc;
                单位.DataBind();


                School资产转移BLL      bllzy = new School资产转移BLL();
                List <School一级部门表> gsbm  = bllzy.byzc();
                部门.DataTextField  = "名称";
                部门.DataValueField = "ID";
                部门.DataSource     = gsbm;
                部门.DataBind();

                List <School一级类别表> yjlb = bll.查询一级类别();
                一级.DataTextField  = "名称";
                一级.DataValueField = "ID";
                一级.DataSource     = yjlb;
                一级.DataBind();


                List <School建筑物信息表> 查询建筑物 = bll.查询建筑物信息表();
                存放地点.DataTextField  = "名称";
                存放地点.DataValueField = "ID";
                存放地点.DataSource     = 查询建筑物;
                存放地点.DataBind();
            }
        }
예제 #27
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.");
            }
        }