コード例 #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;
        }
コード例 #2
0
        protected void Button8_Click(object sender, EventArgs e)
        {
            if (完成时间.Text == "")
            {
                完成时间.Text = 完成时间.EmptyText;
            }
            if (TextBox1.Text != "" && 完成时间.Text != "" && TextBox3.Text != "")
            {
                School资产报修BLL   bll   = new School资产报修BLL();
                SchoolX_资产报修流程表 model = new SchoolX_资产报修流程表();
                model.维修人电话 = TextBox1.Text;
                model.完工时间  = 完成时间.Text;
                model.故障原因  = TextBox3.Text;
                model.维修人员  = TextBox2.Text;
                model.流程状态  = "已完工,待反馈";
                object  a       = Grid1.SelectedRow.DataKeys[0];
                int     id      = Convert.ToInt32(a);
                AM_提醒通知 ammodel = new AM_提醒通知();

                ammodel.发起时间 = DateTime.Now;
                ammodel.是否已读 = "否";
                ammodel.通知类型 = "待办事项通知";
                ammodel.通知职务 = "发起人";
                ammodel.发起人  = Session["姓名"].ToString();
                ammodel.消息内容 = "您来自" + ammodel.发起人 + "的资产报修完成申请,请及时处理!";
                ammodel.消息事项 = "资产报修";
                ammodel.是否已读 = "否";
                AM_待办业务 dbmodel = new AM_待办业务();
                dbmodel.处理方式     = "个人";
                dbmodel.处理人      = bll.ren(id);
                dbmodel.流程状态     = model.流程状态;
                dbmodel.事项名称     = "资产报修";
                dbmodel.发起人      = Session["姓名"].ToString();
                dbmodel.通知内容     = "您来自" + dbmodel.发起人 + "的资产报修完成申请,请及时处理!";
                dbmodel.FlowName = "资产报修";
                dbmodel.Sort     = 3;
                dbmodel.发起时间     = DateTime.Now.ToLongDateString();
                int xx = bll.添加完成信息(id, model, ammodel, dbmodel);
                if (xx > 0)
                {
                    grid1_bind();
                    Alert.ShowInTop("提交成功!");
                    Window5.Hidden = true;
                    流程状态待派单.Hidden = true;
                }
                else
                {
                    Alert.ShowInTop("提交错误!");
                }
            }
            else
            {
                Alert.ShowInTop("请填写信息完整!");
                return;
            }
        }
コード例 #3
0
        protected void 部门_SelectedIndexChanged(object sender, EventArgs e)
        {
            School资产报修BLL bll = new School资产报修BLL();

            负责人.Enabled = true;
            int ID = Convert.ToInt32(部门.SelectedValue);

            if (ID > 0)
            {
                List <用户表> listuser = bll.listuser(ID);
                负责人.DataTextField  = "姓名";
                负责人.DataValueField = "ID";
                负责人.DataSource     = listuser;
                负责人.DataBind();
            }
        }
コード例 #4
0
        protected void Button9_Click1(object sender, EventArgs e)
        {
            int           ID   = Convert.ToInt32(HttpContext.Current.Session["UserID"]);
            School资产报修BLL bll  = new School资产报修BLL();
            string        xa   = bll.用户权限(ID);
            object        a    = Grid1.SelectedRow.DataKeys[0];
            int           xx   = Convert.ToInt32(a);
            int           sort = Convert.ToInt32(Grid1.SelectedRow.DataKeys[9]);
            string        nm   = HttpContext.Current.Session["姓名"].ToString();
            string        ren  = bll.ren(xx);

            if (xa == "资产管理员" && sort == 1)
            {
                DataSet   ds = bll.查维修人();
                DataTable dt = ds.Tables[0];

                Grid5.DataSource = dt;
                Grid5.DataBind();


                Window4.Hidden = false;
            }
            else if (xa == "维修人员" && sort == 2)
            {
                School待办业务BLL blla = new School待办业务BLL();
                TextBox2.Text  = nm;
                TextBox1.Text  = blla.获取维修人电话(nm);
                Window5.Hidden = false;
            }
            else if (sort == 3 && ren == nm)
            {
                DateTime dtime = DateTime.Now;
                string   sj    = dtime.Year + "-" + dtime.Month + "-" + dtime.Day;
                DatePicker2.EmptyText = sj;
                if (DatePicker2.Text == "")
                {
                    DatePicker2.Text = DatePicker2.EmptyText;
                }
                Window6.Hidden = false;
            }
            else
            {
                Alert.ShowInTop("您没有此权限!");
            }
        }
コード例 #5
0
        protected void Button6_Click(object sender, EventArgs e)
        {
            if (DatePicker1.Text == "")
            {
                DatePicker1.Text = DatePicker1.EmptyText;
            }
            if (TextBox4.Text != "" && DatePicker1.Text != "")
            {
                SchoolX_资产报修流程表 model = new SchoolX_资产报修流程表();
                model.维修人员  = TextBox4.Text;
                model.维修人电话 = TextBox7.Text;
                model.派单时间  = DatePicker1.Text;
                OffSession();
                string username = Session["姓名"].ToString();
                string tel      = Session["电话号码"].ToString();
                model.管理员   = username;
                model.管理员电话 = tel;
                model.流程状态  = "已派单,维修中";



                AM_提醒通知 ammodel = new AM_提醒通知();

                ammodel.发起时间 = DateTime.Now;
                ammodel.是否已读 = "否";
                ammodel.通知类型 = "待办事项通知";
                ammodel.通知职务 = "维修人员";
                ammodel.发起人  = Session["姓名"].ToString();
                ammodel.消息内容 = "您来自" + ammodel.发起人 + "的资产报修维修申请,请及时处理!";
                ammodel.消息事项 = "资产报修";
                ammodel.是否已读 = "否";
                AM_待办业务 dbmodel = new AM_待办业务();
                dbmodel.处理方式     = "个人";
                dbmodel.处理人      = model.维修人员;
                dbmodel.Sort     = 2;
                dbmodel.流程状态     = model.流程状态;
                dbmodel.事项名称     = "资产报修";
                dbmodel.FlowName = "资产报修";
                dbmodel.发起人      = Session["姓名"].ToString();
                dbmodel.通知内容     = "您来自" + dbmodel.发起人 + "的资产报修维修申请,请及时处理!";
                dbmodel.发起时间     = DateTime.Now.ToLongDateString();
                School资产报修BLL bll = new School资产报修BLL();
                object        a   = Grid1.SelectedRow.DataKeys[0];
                int           id  = Convert.ToInt32(a);
                int           xx  = bll.添加维修信息(id, model, ammodel, dbmodel);
                if (xx > 0)
                {
                    grid1_bind();
                    Window4.Hidden = true;
                    流程状态待派单.Hidden = true;
                    Alert.ShowInTop("提交成功!");
                }
                else
                {
                    grid1_bind();
                    Alert.ShowInTop("提交错误!");
                }
            }
            else
            {
                Alert.ShowInTop("请填写信息完整!");
                return;
            }
        }
コード例 #6
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();
            }
        }