public void TestSetup()
        {
            wgd_testObject = new WorkGroupDetail();
            busCalendar    = new BWorkGroupCalendar(SysLanguageResource.Parsi);

            #region insert workgroup,shift,person
            BPerson bperson = new BPerson(SysLanguageResource.Parsi, LocalLanguageResource.Parsi);
            ADOPerson = new Person()
            {
                ID = bperson.CreateWorkingPerson2()
            };

            BWorkgroup bworkGroup = new BWorkgroup();
            ADOWorkGroup.CustomCode = "55-55";
            ADOWorkGroup.Name       = "ClanderWorkGroupTest";
            bworkGroup.SaveChanges(ADOWorkGroup, UIActionType.ADD);

            BShift bshift = new BShift();
            ADOShift1.Name      = "ClanderShiftTest1";
            ADOShift1.Person    = ADOPerson;
            ADOShift1.Color     = "0xff6512";
            ADOShift1.ShiftType = ShiftTypesEnum.WORK;
            bshift.SaveChanges(ADOShift1, UIActionType.ADD);

            ADOShift2.Name      = "ClanderShiftTest2";
            ADOShift2.Color     = "0xbbccaa";
            ADOShift2.Person    = ADOPerson;
            ADOShift2.ShiftType = ShiftTypesEnum.WORK;
            bshift.SaveChanges(ADOShift2, UIActionType.ADD);
            #endregion

            #region date inti
            date1  = Utility.ToMildiDate("1390/5/1");
            date2  = Utility.ToMildiDate("1390/5/2");
            date3  = Utility.ToMildiDate("1390/5/3");
            date4  = Utility.ToMildiDate("1390/5/5");
            date5  = Utility.ToMildiDate("1390/5/6");
            date6  = Utility.ToMildiDate("1390/5/7");
            date7  = Utility.ToMildiDate("1390/5/9");
            date8  = Utility.ToMildiDate("1390/5/10");
            date9  = Utility.ToMildiDate("1390/5/11");
            date10 = Utility.ToMildiDate("1389/1/1");
            date11 = Utility.ToMildiDate("1391/1/1");
            #endregion

            wgdTA.Insert(ADOWorkGroup.ID, ADOShift1.ID, date1);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift1.ID, date2);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift1.ID, date3);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift1.ID, date4);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift1.ID, date5);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift2.ID, date6);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift2.ID, date7);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift2.ID, date8);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift2.ID, date9);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift2.ID, date10);
            wgdTA.Insert(ADOWorkGroup.ID, ADOShift2.ID, date11);
            ClearSession();
        }
示例#2
0
        protected void Button5_Click(object sender, EventArgs e)
        {
            BWorkGroupCalendar       bus          = new BWorkGroupCalendar();
            IList <CalendarCellInfo> list         = new List <CalendarCellInfo>();
            IList <decimal>          holidayTypes = new List <decimal>();

            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 5
            });
            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 6
            });
            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 7
            });
            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 8
            });
            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 9
            });
            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 10
            });
            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 1
            });
            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 12
            });
            list.Add(new CalendarCellInfo()
            {
                Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 13
            });
            bus.RepetitionPeriod(1391, 1, 7, 1, 1, holidayTypes, list);
        }