コード例 #1
0
ファイル: CreateApply.cs プロジェクト: huaminglee/yunshanoa
        protected override void Execute(CodeActivityContext context)
        {
            usecarapplyform Applyinfo = new usecarapplyform();
            Applyinfo.ApplyUserName = request.Get(context).ApplyUserName;
            Applyinfo.usecartype = new YunShanOA.BusinessLogic.UseCar.UseTypeManager().GetUsecarType(request.Get(context).usecartypeID);
            Applyinfo.WFID = context.WorkflowInstanceId;

            List<YunShanOA.Model.UseCarModel.usecaranduser> results = new List<usecaranduser>();
            foreach (usecaranduser user in request.Get(context).Usecaranduser)
            {
                usecaranduser usecaranduser = new usecaranduser();
                usecaranduser.Name = user.Name;
                usecaranduser.Email = user.Email;
                results.Add(usecaranduser);
            }
            Applyinfo.Usecaranduser = results;
            Applyinfo.BeginTime = request.Get(context).BeginTime;
            Applyinfo.EndTime = request.Get(context).EndTime;
            Applyinfo.StartDestination = request.Get(context).StartDestination;
            Applyinfo.EndDestination = request.Get(context).EndDestination;
            Applyinfo.ApplyStatus = 2;
            Applyinfo.ApplyReason = request.Get(context).ApplyReason;
            Applyinfo.Comment = request.Get(context).Comment;
            BusinessLogic.UseCar.UsecarApplyformManager ApplyformManager = new UsecarApplyformManager();
            int i = ApplyformManager.Sava(Applyinfo);
            List<usecaranduser> s = new List<usecaranduser>();
            s = new YunShanOA.BusinessLogic.UseCar.UsecarAndUserManager().GetCarAndUserlistByFormID(Applyinfo.UseCarApplyFormID);
            Applyinfo.Usecaranduser = s;
            Applyinfo.UseCarApplyFormID = i;
            Apply.Set(context, Applyinfo);
            // 获取 Text 输入参数的运行时值
        }
コード例 #2
0
 private void ShowDetail(object sender)
 {
     this.btnSubmit.Visible = true;
     string newid = ((LinkButton)sender).CommandArgument;
     usecarapplyform from = new UsecarApplyformManager().GetusecarapplyformById(int.Parse(newid));
     if (from.ApplyStatus == 4)
     {
         this.lbMsg.Text = "你的请求已经被接受,请等待电脑处理!";
         this.btnSubmit.Visible = false;
     }
     else
     {
         this.btnSubmit.Visible = true;
         this.lbMsg.Text = "";
     }
     this.pnlRequests.Visible = true;
     this.lblApplyUseCarFromID.Text = from.UseCarApplyFormID.ToString();
     this.txtCarType.Text = from.usecartype.UseCarTypeName.ToString();
     this.lblType.Text = from.usecartype.UseCarTypeName.ToString();
     this.txtName.Text = from.ApplyUserName;
     this.txtWFID.Text = from.WFID.ToString();
     Session["UseCarTypeID"] = from.usecartype.UseCarTypeID;
     BindGridView(int.Parse(Session["UseCarTypeID"].ToString()), 2);
     this.txtMessage.Text = "尊敬的用车人员,你们所要求的车将在" + from.BeginTime.ToString() + "位于" + from.StartDestination + "出发!" + "你们的还车的时间是" + from.EndTime.ToString();
 }
コード例 #3
0
 private void gvDateBind()
 {
     UsecarApplyformManager Manager = new UsecarApplyformManager();
     gvSelectAll.DataSource = null;
     gvSelectAll.DataSource = Manager.GetusecarapplyformStatus(1);
     gvSelectAll.DataBind();
 }
コード例 #4
0
 private void ShowDetail(object sender)
 {
     this.btnSubmit.Visible = true;
     string newid = ((LinkButton)sender).CommandArgument;
     usecarapplyform from = new UsecarApplyformManager().GetusecarapplyformById(int.Parse(newid));
     if (from.ApplyStatus == 5)
     {
         this.lbMsg.Text = "你的请求已经被接受,请等待电脑处理!";
         this.btnSubmit.Visible = false;
     }
     else
     {
         this.btnSubmit.Visible = true;
         this.lbMsg.Text = "";
     }
     this.pnlRequests.Visible = true;
     this.lblApplyUseCarFromID.Text = from.UseCarApplyFormID.ToString();
     this.txtCarType.Text = from.usecartype.UseCarTypeName.ToString();
     this.txtName.Text = from.ApplyUserName;
     this.txtWFID.Text = from.WFID.ToString();
     this.txtUserCountt.Text = from.Usecaranduser.Count().ToString();
     this.txtID.Text = from.UseCarApplyFormID.ToString();
     this.txtBeginTime1.Text = from.BeginTime.ToString();
     this.txtBeginTime.Text = from.EndTime.ToString();
     this.txtStartDes.Text = from.StartDestination;
     this.txtEndDes.Text = from.EndDestination;
 }
コード例 #5
0
        private void ShowDetail(object sender)
        {
            string newid = ((LinkButton)sender).CommandArgument;
            RequestSelected();
            usecarapplyform usecarapplyform = new YunShanOA.BusinessLogic.UseCar.UsecarApplyformManager().GetusecarapplyformById((int.Parse(newid)));
            txtStartDes.Text = usecarapplyform.StartDestination.ToString();
            txtUseCarType.Text = usecarapplyform.usecartype.UseCarTypeName;
            txtStartTIme.Text = usecarapplyform.BeginTime.ToShortDateString();
            txtName.Text = usecarapplyform.ApplyUserName;
            txtApplyReason.Text = usecarapplyform.ApplyReason;
            this.lblQC.Text = usecarapplyform.WFID.ToString();
            txtApplyComment.Text = usecarapplyform.Comment;
            gvUsers.DataSource = usecarapplyform.Usecaranduser;
            this.LblID.Text = usecarapplyform.UseCarApplyFormID.ToString();
            txtEndDes.Text = usecarapplyform.EndDestination;
            txtEndTime.Text = usecarapplyform.EndTime.ToShortDateString();
            gvUsers.DataBind();
            Session["IDsdfsdf"] = usecarapplyform.ApplyStatus;
            this.lbMsg.Text = "";
            if (2 == usecarapplyform.ApplyStatus || 6 == usecarapplyform.ApplyStatus)
            {
                if (6 == usecarapplyform.ApplyStatus)
                {
                    this.lbMsg0.Visible = true;
                    this.lbMsg0.Text = "该 申 请 是 续 车 的 申 请!";
                    this.txtYName.Enabled = false;
                }
                else
                {
                    this.lbMsg0.Visible = false;
                    this.lbMsg0.Text = "";
                    this.txtYName.Enabled = true;
                }

                this.rbtOK.Checked = true;
                this.rbtOK.Enabled = true;
                this.rbtReject.Enabled = true;
                this.btnSubmit.Visible = true;

            }
            else
            {

                if (1 == usecarapplyform.ApplyStatus)
                {
                    this.rbtReject.Checked = false; ;
                    this.rbtOK.Checked = true;
                    this.lbMsg.Text = "你的请求已经被接受!";
                }
                else if (3 == usecarapplyform.ApplyStatus)
                {
                    this.rbtReject.Checked = true;
                    this.rbtOK.Checked = false;
                }
                this.rbtOK.Enabled = false;
                lbMsg0.Visible = false;
                this.rbtReject.Enabled = false;
                this.btnSubmit.Visible = false;
                this.lbMsg.Text = "你的请求已经被接受!";
                this.txtYName.Enabled = true;
            }
        }
コード例 #6
0
        private void gvDataBind()
        {
            UsecarApplyformManager Manager = new UsecarApplyformManager();
            List<usecarapplyform> gvSelectAll = new List<usecarapplyform>();
            List<usecarapplyform> gvOK = new List<usecarapplyform>();
            gvSelectAll.AddRange(Manager.GetusecarapplyformStatus(2));
            gvSelectAll.AddRange(Manager.GetusecarapplyformStatus(6));

            this.gvSelectAll.DataSource = gvSelectAll;
            this.gvSelectAll.DataBind();

            gvOK.AddRange(Manager.GetusecarapplyformStatus(1));
            gvOK.AddRange(Manager.GetusecarapplyformStatus(4));
            gvOK.AddRange(Manager.GetusecarapplyformStatus(5));
            this.gvOK.DataSource = gvOK;
            this.gvOK.DataBind();

            this.gvReject.DataSource = Manager.GetusecarapplyformStatus(3);
            this.gvReject.DataBind();
        }
コード例 #7
0
        private void ShowDetail(object sender)
        {
            string newid = ((LinkButton)sender).CommandArgument;

            RequestSelected();
            usecarapplyform usecarapplyform = new YunShanOA.BusinessLogic.UseCar.UsecarApplyformManager().GetusecarapplyformById((int.Parse(newid)));

            txtStartDes.Text     = usecarapplyform.StartDestination.ToString();
            txtUseCarType.Text   = usecarapplyform.usecartype.UseCarTypeName;
            txtStartTIme.Text    = usecarapplyform.BeginTime.ToShortDateString();
            txtName.Text         = usecarapplyform.ApplyUserName;
            txtApplyReason.Text  = usecarapplyform.ApplyReason;
            this.lblQC.Text      = usecarapplyform.WFID.ToString();
            txtApplyComment.Text = usecarapplyform.Comment;
            gvUsers.DataSource   = usecarapplyform.Usecaranduser;
            this.LblID.Text      = usecarapplyform.UseCarApplyFormID.ToString();
            txtEndDes.Text       = usecarapplyform.EndDestination;
            txtEndTime.Text      = usecarapplyform.EndTime.ToShortDateString();
            gvUsers.DataBind();
            Session["IDsdfsdf"] = usecarapplyform.ApplyStatus;
            this.lbMsg.Text     = "";
            if (2 == usecarapplyform.ApplyStatus || 6 == usecarapplyform.ApplyStatus)
            {
                if (6 == usecarapplyform.ApplyStatus)
                {
                    this.lbMsg0.Visible   = true;
                    this.lbMsg0.Text      = "该 申 请 是 续 车 的 申 请!";
                    this.txtYName.Enabled = false;
                }
                else
                {
                    this.lbMsg0.Visible   = false;
                    this.lbMsg0.Text      = "";
                    this.txtYName.Enabled = true;
                }

                this.rbtOK.Checked     = true;
                this.rbtOK.Enabled     = true;
                this.rbtReject.Enabled = true;
                this.btnSubmit.Visible = true;
            }
            else
            {
                if (1 == usecarapplyform.ApplyStatus)
                {
                    this.rbtReject.Checked = false;;
                    this.rbtOK.Checked     = true;
                    this.lbMsg.Text        = "你的请求已经被接受!";
                }
                else if (3 == usecarapplyform.ApplyStatus)
                {
                    this.rbtReject.Checked = true;
                    this.rbtOK.Checked     = false;
                }
                this.rbtOK.Enabled     = false;
                lbMsg0.Visible         = false;
                this.rbtReject.Enabled = false;
                this.btnSubmit.Visible = false;
                this.lbMsg.Text        = "你的请求已经被接受!";
                this.txtYName.Enabled  = true;
            }
        }