コード例 #1
0
ファイル: API.cs プロジェクト: agrubin/SiteMinder
                    public StatusApplicationControl(DateTime start,
                                                    DateTime end,
                                                    string ratePlanCode,
                                                    string invTypeCode,
                                                    List <DestinationSystemCodes.DestinationSystemCode> destinationSystemCodeList,
                                                    bool mon = true, bool tue = true, bool weds = true, bool thur = true, bool fri = true, bool sat = true, bool sun = true)
                    {
                        if (DateTime.Compare(start, end) > 0 || (end - DateTime.Today).TotalDays > 400)
                        {
                            throw new Exception("StatusApplicationControl: invalid dates.");
                        }

                        if (invTypeCode == null)
                        {
                            throw new Exception("StatusApplicationControl: invTypeCode argument may not be null.");
                        }

                        Start        = start.ToString("yyyy-MM-dd");
                        End          = end.ToString("yyyy-MM-dd");
                        RatePlanCode = ratePlanCode;
                        InvTypeCode  = invTypeCode;

                        Mon  = mon;
                        Tue  = tue;
                        Weds = weds;
                        Thur = thur;
                        Fri  = fri;
                        Sat  = sat;
                        Sun  = sun;

                        if (destinationSystemCodeList != null)
                        {
                            DestinationSystemCodesNode = new DestinationSystemCodes(destinationSystemCodeList);
                        }
                    }
コード例 #2
0
ファイル: API.cs プロジェクト: agrubin/SiteMinder
                    public StatusApplicationControl(string ratePlanCode,
                                                    string invTypeCode,
                                                    List <DestinationSystemCodes.DestinationSystemCode> destinationSystemCodeList)
                    {
                        RatePlanCode = ratePlanCode;
                        InvTypeCode  = invTypeCode;

                        if (destinationSystemCodeList != null)
                        {
                            DestinationSystemCodesNode = new DestinationSystemCodes(destinationSystemCodeList);
                        }
                    }