Exemplo n.º 1
0
        public ActionResult BusinessTripDetail(string id)
        {
            BTApply oritem = new BTApply();

            if (null != oritem.GetBusinessTripDetail(id))
            {
                if (oritem.BTEdit || oritem.BTDelete)
                {
                    if (oritem.EditOrDelete == "Edit")
                    {
                        var prelist = from o in entities.T_HR_BusinessTrip
                                      where o.LastID == oritem.ID && o.BTEdit == true
                                      select o;

                        if (prelist.Any())
                        {
                            //oritem.preitem = oritem.GetVacationDetail(prelist.First().ID);
                            oritem.GetPreBusinessTripDetail(prelist.First().ID);
                        }

                        //调整View
                    }
                    else if (oritem.EditOrDelete == "Delete")
                    {
                        var prelist = from o in entities.T_HR_BusinessTrip
                                      where o.LastID == oritem.ID && o.BTDelete == true
                                      select o;

                        if (prelist.Any())
                        {
                            //oritem.preitem = oritem.GetVacationDetail(prelist.First().ID);
                            oritem.GetPreBusinessTripDetail(prelist.First().ID);
                        }

                        //调整View
                        var x = X.GetCmp <Panel>("PrePanel");
                        x.Hidden = true;
                    }
                    else
                    {
                        //调整View
                        var x = X.GetCmp <FieldSet>("PreList");
                        x.Hidden = true;
                    }
                }
                else
                {
                    //调整View
                    var x = X.GetCmp <FieldSet>("PreList");
                    x.Hidden = true;
                }
                return(View(oritem));
            }
            else
            {
                return(View());
            }
        }
Exemplo n.º 2
0
        public ActionResult CheckBusinessTrip(string id)
        {
            BTApply preitem = new BTApply();

            if (null != preitem.GetPreBusinessTripDetail(id))
            {
                if (preitem.PreBTEdit || preitem.PreBTDelete)
                {
                    var orelist = (from o in entities.T_HR_BusinessTrip
                                   where o.ID == preitem.PreLastID
                                   select o).First();
                    preitem.GetBusinessTripDetail(orelist.ID);
                    if (orelist.EditOrDelete == "Edit")
                    {
                        //调整View
                    }
                    else if (orelist.EditOrDelete == "Delete")
                    {
                        //调整View
                        var x1 = X.GetCmp <FieldSet>("PreList");
                        x1.Title = "出差取消";
                        var x = X.GetCmp <Panel>("PrePanel");
                        x.Hidden = true;
                    }
                }
                else
                {
                    //调整View
                    var x = X.GetCmp <FieldSet>("OreList");
                    x.Hidden = true;
                    var x1 = X.GetCmp <FieldSet>("PreList");
                    x1.Title = "出差申请";
                }
                return(View(preitem));
            }
            else
            {
                return(View());
            }
        }