Exemplo n.º 1
0
        protected void Button5_Click(object sender, EventArgs e)
        {
            string     sid    = "";
            List <int> inlist = new List <int>();

            //获取grid3选中行数据
            int[] selections = Grid4.SelectedRowIndexArray;
            foreach (int rowIndex in selections)
            {
                int ID = Convert.ToInt32(Grid4.DataKeys[rowIndex][0]);
                sid += rowIndex.ToString() + ",";
                inlist.Add(ID);
            }
            if (inlist.Count == 0)
            {
                Alert.ShowInTop("请选中!", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            School资产报修BLL        bll      = new School资产报修BLL();
            List <School办公设备信息表> listdata = bll.资产转移确定设备(inlist);

            借出人.Text = 负责人.SelectedText;

            Grid2.DataSource = listdata;//DataTable
            Grid2.DataBind();
            Window2.Hidden = true;
        }
Exemplo n.º 2
0
        //点击查看详情
        protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "Action1")
            {
                OffSession();
                string username = Session["姓名"].ToString();
                流程状态待派单.Hidden = false;
                object[] keys = Grid1.DataKeys[e.RowIndex];
                int      ID   = Convert.ToInt32(keys[0].ToString());//获取ID

                int Sort = Convert.ToInt32(keys[9].ToString());

                string 流程状态 = keys[1].ToString();
                if (流程状态 == "待派单")
                {
                    Button9.Text = "派单";
                }
                else if (流程状态 == "已派单,维修中")
                {
                    Button9.Text = "派单并报修";
                }
                else if (流程状态 == "已完工,待反馈")
                {
                    Button9.Text = "结果反馈";
                }



                xx.Text     = ID.ToString();
                查看报修人.Text  = keys[3].ToString();
                查看报修时间.Text = keys[4].ToString();
                查看单号.Text   = keys[2].ToString();
                查看报修地址.Text = keys[5].ToString();

                string          zt    = keys[1].ToString();
                SchoolX_资产报修流程表 model = bll.详情(ID);
                if (model.派单时间 != "" && model.派单时间 != null)
                {
                    TextBox9.Text = model.派单时间;
                }
                else
                {
                    TextBox9.Text = "未完成";
                }
                TextBox5.Text  = "未完成";
                TextBox6.Text  = "未完成";
                TextBox8.Text  = "未完成";
                TextBox9.Text  = "未完成";
                TextBox10.Text = "未完成";
                TextBox11.Text = "未完成";
                TextBox12.Text = "未完成";
                查看故障描述.Text    = "未完成";
                TextBox13.Text = "未完成";
                if (model.维修人员 != "" & model.维修人员 != null)
                {
                    TextBox5.Text = model.维修人员;
                }
                if (model.维修人电话 != "" && model.维修人电话 != null)
                {
                    TextBox11.Text = model.维修人电话;
                }
                if (model.解决时间 != "" && model.解决时间 != null)
                {
                    TextBox6.Text = model.解决时间;
                }
                if (model.管理员 != "" && model.管理员 != null)
                {
                    TextBox8.Text = model.管理员;
                }
                if (model.派单时间 != "" && model.派单时间 != null)
                {
                    TextBox9.Text = model.派单时间;
                }
                if (model.报修人电话 != "" && model.报修人电话 != null)
                {
                    TextBox10.Text = model.报修人电话;
                }
                if (model.维修人电话 != "" && model.维修人电话 != null)
                {
                    TextBox11.Text = model.维修人电话;
                }
                if (model.管理员电话 != "" && model.管理员电话 != null)
                {
                    TextBox12.Text = model.管理员电话;
                }
                if (model.结果反馈 != "" && model.结果反馈 != null)
                {
                    TextBox13.Text = model.结果反馈;
                }
                if (model.故障原因 != "" && model.故障原因 != null)
                {
                    查看故障描述.Text = model.故障原因;
                }
                if (zt == "已完成")
                {
                    Button9.Hidden = true;
                    Button3.Text   = "取消";
                }
                else if (zt == "待派单")
                {
                    Button9.Hidden = false;
                    Button3.Text   = "拒绝";
                }
                else
                {
                    Button9.Hidden = false;
                    Button3.Text   = "取消";
                }
                try
                {
                    string iamgeurl = keys[11].ToString();

                    Image2.ImageUrl = iamgeurl;
                }
                catch (Exception)
                {
                }
                List <int> inlist = new List <int>();
                string[]   sbid   = keys[12].ToString().Split(',');
                foreach (string item in sbid)
                {
                    if (item == "" || item == null)
                    {
                        break;
                    }
                    inlist.Add(Convert.ToInt32(item));
                }
                School资产报修BLL        blla     = new School资产报修BLL();
                List <School办公设备信息表> listdata = blla.资产转移确定设备(inlist);
                Grid3.DataSource = listdata;//DataTable
                Grid3.DataBind();
            }
        }