コード例 #1
0
ファイル: ManageDptEdit.aspx.cs プロジェクト: phiree/testttt
 protected void Page_Load(object sender, EventArgs e)
 {
     string param = Request["dptId"];
     Guid dptId;
     if (!Guid.TryParse(param, out dptId))
     {
         IsNew = true;
         CurrentMgrDpt = new DJ_GovManageDepartment();
     }
     else
     {
         CurrentMgrDpt = bllMgrDpt.GetMgrDpt(dptId);
     }
     if (!IsPostBack)
     {
         if (!IsNew)
         {
             LoadForm();
         }
     }
 }
コード例 #2
0
ファイル: BLLMembership.cs プロジェクト: phiree/testttt
 public void CreateUpdateDptAdmin(DJ_GovManageDepartment mgrDpt)
 {
     TourMembership admin = GetMgrDptAdmin(mgrDpt.Id, 7);
     DJ_User_Gov mgrUser = new DJ_User_Gov();
     if (admin != null)
     {
         mgrUser = (DJ_User_Gov)admin;
     }
     else
     {
         TourMembership member = GetMember(mgrDpt.seoname);
         if (member != null)
         {
             mgrUser = (DJ_User_Gov)member;
         }
     }
     string loginname = mgrDpt.seoname;
     mgrUser.GovDpt = mgrDpt;
     mgrUser.Name = loginname;
     mgrUser.PermissionType = PermissionType.报表查看员 | PermissionType.信息编辑员 | PermissionType.用户管理员;
     mgrUser.Password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile("123456", "MD5");
     CreateUpdateMember(mgrUser);
 }
コード例 #3
0
ファイル: DptStatistic.aspx.cs プロジェクト: phiree/testttt
    private List<dptDetail> BinddptDetail(DJ_GovManageDepartment dpt, string datetime)
    {
        List<dptDetail> ListdptDetail = new List<dptDetail>();
           bool? IsVerified_City = null, IsVerified_Country = null;
            switch (int.Parse(ddlIsReward.SelectedValue))
            {
                case 0: IsVerified_City = null; IsVerified_Country = null; break;
                case 1: IsVerified_City = true; IsVerified_Country = null; break;
                case 2: IsVerified_City = false; IsVerified_Country = null; break;
                case 3: IsVerified_City = null; IsVerified_Country = true; break;
                case 4: IsVerified_City = null; IsVerified_Country = false; break;
                default:
                    break;
            }
        int adult_live_year = 0, child_live_year = 0, room_year = 0, appendbed_year = 0, adult_visited_year=0,child_visited_year = 0;
        for (int i=1 ; i <=DateTime.Parse(datetime).Month; i++)
        {
            List<DJ_GroupConsumRecord> record = bllrecord.GetByDate(DateTime.Parse(datetime).Year, i, dpt.Area.Code, Master.CurrentDJS.Id,IsVerified_City,IsVerified_Country).ToList();
            int adult_live_month = 0, child_live_month = 0, room_month = 0, appendbed_month = 0, adult_visited_month = 0,child_visited_month=0;

            foreach (var r in record)
            {
                dptDetail detail = new dptDetail();
                detail.Date = r.ConsumeTime.ToString("yyyy-MM-dd");
                if (r.Enterprise.Type == EnterpriseType.宾馆)
                {
                    detail.People = (r.AdultsAmount * r.LiveDay) + "/" + (r.ChildrenAmount * r.LiveDay);
                    detail.Room = r.RoomNum;
                    detail.Appendbed = r.AppendBed;
                    adult_live_month += r.AdultsAmount * r.LiveDay;
                    child_live_month += r.ChildrenAmount * r.LiveDay;
                    room_month += r.RoomNum;
                    appendbed_month += r.AppendBed;
                    detail.Visited = "0/0";
                }
                if (r.Enterprise.Type == EnterpriseType.景点)
                {
                    detail.Visited = r.AdultsAmount + "/" + r.ChildrenAmount;
                    detail.People = "0/0";
                    adult_visited_month += r.AdultsAmount;
                    child_visited_month += r.ChildrenAmount;
                }
                ListdptDetail.Add(detail);
            }
            dptDetail detail2 = new dptDetail();
            detail2.Date = i + "月份总计";
            detail2.People = adult_live_month + "/" + child_live_month;
            detail2.Room = room_month;
            detail2.Appendbed = appendbed_month;
            detail2.Visited = adult_visited_month + "/" + child_visited_month;
            ListdptDetail.Add(detail2);
            adult_live_year += adult_live_month;
            child_live_year += child_live_month;
            room_year += room_month;
            appendbed_year += appendbed_month;
            adult_visited_year += adult_visited_month;
            child_visited_year += child_visited_month;
        }
        dptDetail detail3 = new dptDetail();
        detail3.Date = "总计";
        detail3.People = adult_live_year + "/" + child_live_year;
        detail3.Room = room_year;
        detail3.Appendbed = appendbed_year;
        detail3.Visited = adult_visited_year + "/" + child_visited_year;
        ListdptDetail.Add(detail3);
        return ListdptDetail;
    }
コード例 #4
0
ファイル: BLLDJEnterprise.cs プロジェクト: phiree/testttt
        /// <summary>
        /// 管理部门辖区的纳�已移�企业列表
        /// </summary>
        /// <param name="gov"></param>
        /// <returns></returns>
        public IList<DJ_TourEnterprise> GetRewardEntList(string entName,DJ_GovManageDepartment gov, EnterpriseType? entType, RewardType rewardType)
        {
            IList<DJ_TourEnterprise> entList = dalEnt.GetList(entName,true,gov.Area.Code, entType, rewardType);

            return entList;
        }