예제 #1
0
 protected void AffCiph_Click(object sender, EventArgs e)
 {
     ClearTBs();
     whichCipher = false;
     toggleSubstitution(false);
     toggleAffine(true);
 }
    protected override void initialize() {
      base.initialize();
      this.currentValue = this.Property.Value as Boolean?;
      this.Property.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.property_PropertyChanged);
      this.Property.ValueError += new EventHandler<ExceptionEventArgs>(this.property_ValueError);

      this.cbx = new CheckBox() {
        Visibility = Visibility.Visible,
        //Margin = new Thickness(1),
        VerticalAlignment = VerticalAlignment.Center,
        HorizontalAlignment = HorizontalAlignment.Left,
        VerticalContentAlignment = VerticalAlignment.Center,
        Margin = new Thickness(1, 4, 0, 0),
        IsChecked = this.currentValue,
        IsEnabled = this.Property.CanWrite,
        Cursor = Cursors.Hand
      };
      this.Content = this.cbx;
      this.cbx.Checked += new RoutedEventHandler(this.cbx_CheckboxChanged);
      this.cbx.Unchecked += new RoutedEventHandler(this.cbx_CheckboxChanged);
      //this.dtp.CalendarClosed += new RoutedEventHandler(dtp_CalendarClosed);
      //this.dtp.LostFocus += new RoutedEventHandler(dtp_LostFocus);
      //this.pnl.Children.Add(dtp);
      this.cbx.Focus();
    }
 public void InitConnect()
 {
     Connection = new Teamspeak3Connection();
     Connection.Connected    += (c) => IsConnected = true;
     Connection.Disconnected += (c) => IsConnected = false;
     Assert.IsNull(IsConnected);
 }
예제 #4
0
 public virtual void StartFadeOut()
 {
     mCol = this.gameObject.renderer.material.color;
     startFade = true;
     completed = false;
     fadingOut = true;
     index = mCol.a;
 }
 void property_PropertyChanged(Object sender, System.ComponentModel.PropertyChangedEventArgs e) {
   if (e.PropertyName == "Value") {
     this.currentValue = this.Property.Value as Boolean?;
     this.cbx.IsChecked = this.currentValue;
   }
   if (e.PropertyName == "CanWrite") {
     this.cbx.IsEnabled = this.Property.CanWrite;
   }
 }
예제 #6
0
 // Use this for initialization
 public virtual void Awake()
 {
     startFade = null;
     completed = null;
     fadingOut = null;
     mCol = this.gameObject.renderer.material.color;
     index = 0;
     duration = 1 / duration;
 }
예제 #7
0
 public Customer(String firstName, String lastName,
     String address, Boolean isNew, Boolean? isSubscribed)
 {
     this.FirstName = firstName;
     this.LastName = lastName;
     this.Address = address;
     this.IsNew = isNew;
     this.IsSubscribed = isSubscribed;
 }
예제 #8
0
        public ThreeDSecureInfo(NodeWrapper node)
        {
            if (node == null) return;

            Enrolled = node.GetString("enrolled");
            Status = node.GetString("status");
            LiabilityShifted = node.GetBoolean("liability-shifted");
            LiabilityShiftPossible = node.GetBoolean("liability-shift-possible");
        }
예제 #9
0
 private Message(Builder builder)
 {
     collapseKey = builder._collapseKey;
     delayWhileIdle = builder._delayWhileIdle;
     timeToLive = builder._timeToLive;
     dryRun = builder._dryRun;
     restrictedPackageName = builder._restrictedPackageName;
     data = builder._data;
 }
예제 #10
0
 private DbConnectionString(DataBaseType DbType, String DataSource, String UserName, String Password, String DataBase, Int32 Port = 0, Boolean IsPooling = true, String EncodingName = "utf8")
 {
     this._DataSource = DataSource;
     this._UserID = UserName;
     this._Password = Password;
     this._DbType = DbType;
     this._Port = Port;
     this._IsPooling = IsPooling;
     this._EncodingName = EncodingName;
     this._DataBase = DataBase;
 }
 public void IsMember(User CurrentUser)
 {
     string siteApproverGroupname = Config.TimeOffApprovers;
     ConfigListValues objConfigAppList = new ConfigListValues();
     objConfigAppList.GetConfigValues(null);
     if (objConfigAppList.items != null)
     {
         if (objConfigAppList.items.ContainsKey("TimeOffApprovers"))
             siteApproverGroupname = objConfigAppList.items["TimeOffApprovers"].ToString();
     }
     GroupsClass objTOR = new GroupsClass();
     IsGroupMember = objTOR.IsCurrentUserExistInGroup(siteApproverGroupname, CurrentUser.LoginName);
 }
예제 #12
0
 public Disbursement(NodeWrapper node, BraintreeService braintreeService)
 {
     Id = node.GetString("id");
     Amount = node.GetDecimal("amount");
     ExceptionMessage = node.GetString("exception-message");
     DisbursementDate = node.GetDateTime("disbursement-date");
     FollowUpAction = node.GetString("follow-up-action");
     MerchantAccount = new MerchantAccount(node.GetNode("merchant-account"));
     TransactionIds = new List<String>();
     foreach (NodeWrapper stringNode in node.GetList("transaction-ids/item")) 
     {
         TransactionIds.Add(stringNode.GetString("."));
     }
     Success = node.GetBoolean("success");
     Retry = node.GetBoolean("retry");
     service = braintreeService;
 }
        //INITIALIZE
        public ProxySettingsData()
        {
            bypassProxyForLocalAddress = null;

            exceptions = null;

            ftpProtocolIpEndPoint = null;

            httpProtocolIpEndPoint = null;

            httpsProtocolIpEndPoint = null;

            proxyEnable = null;

            socksProtocolIpEndPoint = null;

            useSameProxyServerForAllProtocols = null;
        }
예제 #14
0
        private void changeAppThemeIfNeeded()
        {
            if (NightFallDelegate == null)
                return;

            if ((!NightMode.HasValue || NightMode.Value)
            && (CurrentTime.Hour >= 7 && CurrentTime.Hour < 22))
            {
                NightMode = false;
                NightFallDelegate?.Invoke(false);
            }
            else if ((!NightMode.HasValue || !NightMode.Value)
            && (CurrentTime.Hour < 7 || CurrentTime.Hour >= 22))
            {
                NightMode = true;
                NightFallDelegate?.Invoke(true);
            }
        }
예제 #15
0
 public static ExistingRefundTotal GetTotalRefunds(Guid pkOrderId, Boolean?includeBookings, String ApiToken, String ApiServer)
 {
     return(Newtonsoft.Json.JsonConvert.DeserializeObject <ExistingRefundTotal>(Factory.GetResponse("ProcessedOrders/GetTotalRefunds", "pkOrderId=" + pkOrderId + "&includeBookings=" + Newtonsoft.Json.JsonConvert.SerializeObject(includeBookings) + "", ApiToken, ApiServer), new JsonSerializerSettings {
             NullValueHandling = NullValueHandling.Ignore
         }));
 }
예제 #16
0
 /// <summary>
 /// Sets the Force property
 /// </summary>
 /// <param name="force">Force property</param>
 /// <returns>this instance</returns>
 public DetachVolumeRequest WithForce(Boolean force)
 {
     this.forceField = force;
     return this;
 }
예제 #17
0
 public IfcLogical(Boolean?value)
 {
     this.Value = value;
 }
 /// <summary>
 /// Sets the AllOfferListingsConsidered property
 /// </summary>
 /// <param name="allOfferListingsConsidered">AllOfferListingsConsidered property</param>
 /// <returns>this instance</returns>
 public GetLowestOfferListingsForSKUResult WithAllOfferListingsConsidered(Boolean allOfferListingsConsidered)
 {
     this.allOfferListingsConsideredField = allOfferListingsConsidered;
     return(this);
 }
예제 #19
0
 /// <summary>
 /// Sets the Acknowledged property
 /// </summary>
 /// <param name="acknowledged">Acknowledged property</param>
 /// <returns>this instance</returns>
 public GetReportListRequest WithAcknowledged(Boolean acknowledged)
 {
     this.acknowledgedField = acknowledged;
     return this;
 }
예제 #20
0
 protected void ClearAll_Click(object sender, EventArgs e)
 {
     toggleValues(false);
     whichCipher = null;
 }
예제 #21
0
 /// <summary>
 /// Allows automatic initialization of "cbSize" with "new WINDOWINFO(null/true/false)".
 /// </summary>
 /// <param name="filler"></param>
 public WINDOWINFO(Boolean?filler) : this()
 {
     cbSize = (UInt32)(Marshal.SizeOf(typeof(WINDOWINFO)));
 }
예제 #22
0
파일: KSC.cs 프로젝트: ysdavy/Kopernicus
        // Apply the patches
        public void Start()
        {
            _body = GetComponent <CelestialBody>();
            if (!_body.isHomeWorld)
            {
                Destroy(this);
                return;
            }

            _ksc      = _body.pqsController.GetComponentsInChildren <PQSCity>(true).First(m => m.name == "KSC");
            _mapDecal = _body.pqsController.GetComponentsInChildren <PQSMod_MapDecalTangent>(true)
                        .First(m => m.name == "KSC");

            if (_ksc == null)
            {
                Debug.LogError("[Kopernicus] KSC: Unable to find homeworld body with PQSCity named KSC");
                return;
            }

            if (_mapDecal == null)
            {
                Debug.LogError(
                    "[Kopernicus] KSC: Unable to find homeworld body with PQSMod_MapDecalTangent named KSC");
                return;
            }

            // Load new data into the PQSCity
            if (latitude.HasValue && longitude.HasValue)
            {
                _ksc.repositionRadial = Utility.LLAtoECEF(latitude.Value, longitude.Value, 0, _body.Radius);
            }
            else if (repositionRadial.HasValue)
            {
                _ksc.repositionRadial = repositionRadial.Value;
            }
            else
            {
                repositionRadial = _ksc.repositionRadial;
            }

            if (reorientInitialUp.HasValue)
            {
                _ksc.reorientInitialUp = reorientInitialUp.Value;
            }
            else
            {
                reorientInitialUp = _ksc.reorientInitialUp;
            }

            if (repositionToSphere.HasValue)
            {
                _ksc.repositionToSphere = repositionToSphere.Value;
            }
            else
            {
                repositionToSphere = _ksc.repositionToSphere;
            }

            if (repositionToSphereSurface.HasValue)
            {
                _ksc.repositionToSphereSurface = repositionToSphereSurface.Value;
            }
            else
            {
                repositionToSphereSurface = _ksc.repositionToSphereSurface;
            }

            if (repositionToSphereSurfaceAddHeight.HasValue)
            {
                _ksc.repositionToSphereSurfaceAddHeight = repositionToSphereSurfaceAddHeight.Value;
            }
            else
            {
                repositionToSphereSurfaceAddHeight = _ksc.repositionToSphereSurfaceAddHeight;
            }

            if (reorientToSphere.HasValue)
            {
                _ksc.reorientToSphere = reorientToSphere.Value;
            }
            else
            {
                reorientToSphere = _ksc.reorientToSphere;
            }

            if (repositionRadiusOffset.HasValue)
            {
                _ksc.repositionRadiusOffset = repositionRadiusOffset.Value;
            }
            else
            {
                repositionRadiusOffset = _ksc.repositionRadiusOffset;
            }

            if (lodvisibleRangeMult.HasValue)
            {
                foreach (PQSCity.LODRange lodRange in _ksc.lod)
                {
                    lodRange.visibleRange *= (Single)lodvisibleRangeMult.Value;
                }
            }
            else
            {
                lodvisibleRangeMult = 1;
            }

            if (reorientFinalAngle.HasValue)
            {
                _ksc.reorientFinalAngle = reorientFinalAngle.Value;
            }
            else
            {
                reorientFinalAngle = _ksc.reorientFinalAngle;
            }

            // Load new data into the MapDecal
            if (radius.HasValue)
            {
                _mapDecal.radius = radius.Value;
            }
            else
            {
                radius = _mapDecal.radius;
            }

            if (heightMapDeformity.HasValue)
            {
                _mapDecal.heightMapDeformity = heightMapDeformity.Value;
            }
            else
            {
                heightMapDeformity = _mapDecal.heightMapDeformity;
            }

            if (absoluteOffset.HasValue)
            {
                _mapDecal.absoluteOffset = absoluteOffset.Value;
            }
            else
            {
                absoluteOffset = _mapDecal.absoluteOffset;
            }

            if (absolute.HasValue)
            {
                _mapDecal.absolute = absolute.Value;
            }
            else
            {
                absolute = _mapDecal.absolute;
            }

            if (decalLatitude.HasValue && decalLongitude.HasValue)
            {
                _mapDecal.position = Utility.LLAtoECEF(decalLatitude.Value, decalLongitude.Value, 0, _body.Radius);
            }
            else if (position.HasValue)
            {
                _mapDecal.position = position.Value;
            }
            else
            {
                position = _mapDecal.position;
            }

            // Move the SpaceCenter
            if (SpaceCenter.Instance != null)
            {
                Transform spaceCenterTransform = SpaceCenter.Instance.transform;
                Transform kscTransform         = _ksc.transform;
                spaceCenterTransform.localPosition = kscTransform.localPosition;
                spaceCenterTransform.localRotation = kscTransform.localRotation;

                // Reset the SpaceCenter
                SpaceCenter.Instance.Start();
            }
            else
            {
                Debug.Log("[Kopernicus]: KSC: No SpaceCenter instance!");
            }

            // Add a material fixer
            DontDestroyOnLoad(gameObject.AddComponent <MaterialFixer>());

            // Events
            Events.OnSwitchKSC.Fire(this);
        }
예제 #23
0
        public void Sortable_Set_SetsIsSortable(Boolean?isColumnSortable, Boolean isGridSortable, Boolean?expectedIsSortable)
        {
            foreach (IGridColumn column in htmlGrid.Grid.Columns)
            {
                column.IsSortable = isColumnSortable;
            }

            htmlGrid.Sortable(isGridSortable);

            foreach (IGridColumn actual in htmlGrid.Grid.Columns)
            {
                Assert.AreEqual(expectedIsSortable, actual.IsSortable);
            }
        }
예제 #24
0
 public IfcOffsetCurve2D(IfcCurve __BasisCurve, IfcLengthMeasure __Distance, Boolean?__SelfIntersect)
 {
     this._BasisCurve    = __BasisCurve;
     this._Distance      = __Distance;
     this._SelfIntersect = __SelfIntersect;
 }
예제 #25
0
        protected static void SerializeProperty(Utf8JsonWriter writer, string name, Boolean?value, Boolean?defval = null)
        {
            if (!value.HasValue)
            {
                return;
            }
            if (defval.HasValue && defval.Value.Equals(value.Value))
            {
                return;
            }

            Guard.NotNull(writer, nameof(writer));

            writer.WriteBoolean(name, value.Value);
        }
        public String Generate(Int32?IdCustomer, Int32?IdAccount, DateTime?StartDate, DateTime?EndDate, Boolean?GetTransmited, String FileHeaderList, String FileDetailList)
        {
            UserName     = UserName.Replace(" ", "").Replace(".", "");
            CustomerName = CustomerName.Replace(" ", "").Replace(".", "");

            ReportDocument rpt = new ReportDocument();

            rpt.Load(this.ReportPath);
            rpt.FileName = this.ReportPath;
            CustomerName = CustomerName.Replace(@"\", "")
                           .Replace(@"/", "")
                           .Replace(@":", "")
                           .Replace(@"*", "")
                           .Replace(@"?", "")
                           .Replace("\"", "")
                           .Replace(@"<", "")
                           .Replace(@">", "")
                           .Replace(@"&", "")
                           .Replace(@"=", "");
            this.FilePath = this.FilePath + @"\" + UserName + @"\" + CustomerName;
            this.Url      = this.Url + @"/" + UserName + @"/" + CustomerName;
            if (!Directory.Exists(this.FilePath))
            {
                Directory.CreateDirectory(this.FilePath);
            }
            foreach (FileInfo file in new DirectoryInfo(this.FilePath).GetFiles())
            {
                file.Delete();
            }

            String FileNameNoPath = DateTime.Now.ToString("ddMMyyhhmmss");
            String FileName       = this.FilePath + @"\" + FileNameNoPath;
            List <Commons.Reports.ImportationList> data = new List <Commons.Reports.ImportationList>();
            DateTime start = (DateTime)StartDate;
            DateTime end   = (DateTime)EndDate;

            Api.Client apiClient = new Api.Client(System.Configuration.ConfigurationManager.AppSettings["URLAPI"]);

            IRestResponse WSR = Task.Run(() => apiClient.getJArray("Reporte/ListaImportacion", "IdCustomer=" + IdCustomer
                                                                   + "&IdAccount=" + IdAccount
                                                                   + "&StartDate=" + start.ToString("yyy-MM-dd")
                                                                   + "&EndDate=" + end.ToString("yyy-MM-dd")
                                                                   + "&GetTransmited=" + GetTransmited
                                                                   + "&FileHeaderList=" + FileHeaderList
                                                                   + "&FileDetailList=" + FileDetailList)).Result;

            if (WSR.StatusCode == HttpStatusCode.OK)
            {
                data = JArray.Parse(WSR.Content).ToObject <List <Commons.Reports.ImportationList> >();
            }
            DataSet ds = new DataSet();

            ds.Tables.Add(Data.ListToDataTable <Commons.Reports.ImportationList>(data));
            ds.Tables[0].TableName = "ado";

            rpt.SetDataSource(ds);
            rpt.ParameterFields["Fecha_Inicial"].CurrentValues.Add(Data.CrParameterConvert(StartDate));
            rpt.ParameterFields["Fecha_Final"].CurrentValues.Add(Data.CrParameterConvert(EndDate));
            rpt.ParameterFields["Usuario"].CurrentValues.Add(Data.CrParameterConvert(UserName));
            rpt.ExportToDisk(ExportFormatType.PortableDocFormat, FileName + ".pdf");
            //rpt.ExportToDisk(ExportFormatType.Excel, FileName + ".xls");

            ExportOptions              exOpt   = new ExportOptions();
            ExcelFormatOptions         xlsOpt  = new ExcelFormatOptions();
            DiskFileDestinationOptions diskOpt = new DiskFileDestinationOptions();

            exOpt = rpt.ExportOptions;
            xlsOpt.ExcelUseConstantColumnWidth = false;
            xlsOpt.ExcelTabHasColumnHeadings   = true;
            exOpt.ExportFormatType             = ExportFormatType.Excel;
            exOpt.FormatOptions             = xlsOpt;
            exOpt.ExportDestinationType     = ExportDestinationType.DiskFile;
            diskOpt.DiskFileName            = FileName + ".xls";
            exOpt.DestinationOptions        = diskOpt;
            rpt.ExportOptions.FormatOptions = xlsOpt;
            rpt.Export();

            rpt.Close();
            rpt.Dispose();

            return(this.Url + @"/" + FileNameNoPath);
        }
예제 #27
0
        /// <summary>高级查询</summary>
        /// <param name="provinceId">省份</param>
        /// <param name="cityId">城市</param>
        /// <param name="version">版本</param>
        /// <param name="enable"></param>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <param name="key"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        public static IList <Node> Search(Int32 provinceId, Int32 cityId, String version, Boolean?enable, DateTime start, DateTime end, String key, PageParameter page)
        {
            var exp = new WhereExpression();

            if (provinceId >= 0)
            {
                exp &= _.ProvinceID == provinceId;
            }
            if (cityId >= 0)
            {
                exp &= _.CityID == cityId;
            }
            if (!version.IsNullOrEmpty())
            {
                exp &= _.Version == version;
            }
            if (enable != null)
            {
                exp &= _.Enable == enable.Value;
            }

            //exp &= _.CreateTime.Between(start, end);
            exp &= _.LastLogin.Between(start, end);

            if (!key.IsNullOrEmpty())
            {
                exp &= SearchWhereByKeys(key);
            }

            return(FindAll(exp, page));
        }
예제 #28
0
		private void MainWindow_Closing(object sender, CancelEventArgs e) {

			WindowFlag = false; // Prevents monitor restart.

			if (Monitor.ConnectionState >= WingmanAPI.Monitor.State.Started) Monitor.Stop();

		}
예제 #29
0
 private void AssertValid(Boolean?rslt, bool expected)
 {
     Assert.IsTrue(rslt.HasValue);
     Assert.AreEqual(expected, rslt.Value);
 }
 /// <summary>
 /// Sets the HasNext property
 /// </summary>
 /// <param name="hasNext">HasNext property</param>
 /// <returns>this instance</returns>
 public GetReportScheduleListByNextTokenResult WithHasNext(Boolean hasNext)
 {
     this.hasNextField = hasNext;
     return(this);
 }
예제 #31
0
 protected void LButtonforMergeSort_Click(object sender, EventArgs e)
 {
     toggleTBSort(true);
     whichSort = true;
 }
예제 #32
0
파일: 地区.Biz.cs 프로젝트: vv7a/X
        /// <summary>高级查询</summary>
        /// <param name="parentid">父级</param>
        /// <param name="level"></param>
        /// <param name="idstart"></param>
        /// <param name="idend"></param>
        /// <param name="enable"></param>
        /// <param name="key"></param>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        public static IList <Area> Search(Int32 parentid, Int32 level, Int32 idstart, Int32 idend, Boolean?enable, String key, DateTime start, DateTime end, PageParameter page)
        {
            var exp = _.UpdateTime.Between(start, end);

            if (parentid >= 0)
            {
                exp &= _.ParentID == parentid;
            }
            if (level > 0)
            {
                exp &= _.Level == level;
            }
            if (idstart > 0)
            {
                exp &= _.ID >= idstart;
            }
            if (idend > 0)
            {
                exp &= _.ID <= idend;
            }
            if (enable != null)
            {
                exp &= _.Enable == enable;
            }

            if (!key.IsNullOrEmpty())
            {
                if (key.ToLong() > 0)
                {
                    exp &= _.ID == key | _.TelCode == key | _.ZipCode == key;
                }
                else
                {
                    exp &= _.Name == key | _.FullName.StartsWith(key) | _.Kind == key | _.PinYin.StartsWith(key) | _.JianPin == key | _.GeoHash.StartsWith(key);
                }
            }

            return(FindAll(exp, page));
        }
예제 #33
0
 /// <summary>
 /// Sets the Replace property
 /// </summary>
 /// <param name="replace">Replace property</param>
 /// <returns>this instance</returns>
 public ReplaceableAttribute WithReplace(Boolean replace)
 {
     this.replaceField = replace;
     return this;
 }
예제 #34
0
 public virtual void    SetNullableBoolean(object o, Boolean?value)
 {
     SetValue(o, value);
 }
예제 #35
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.CRID)))
     {
         this._CRID = reader.GetInt32(_.CRID);
     }
     if ((false == reader.IsDBNull(_.CompanyID)))
     {
         this._CompanyID = reader.GetGuid(_.CompanyID);
     }
     if ((false == reader.IsDBNull(_.CompanyName)))
     {
         this._CompanyName = reader.GetString(_.CompanyName);
     }
     if ((false == reader.IsDBNull(_.CompanyType)))
     {
         this._CompanyType = reader.GetInt32(_.CompanyType);
     }
     if ((false == reader.IsDBNull(_.ChargeType)))
     {
         this._ChargeType = reader.GetInt32(_.ChargeType);
     }
     if ((false == reader.IsDBNull(_.UserCount)))
     {
         this._UserCount = reader.GetInt32(_.UserCount);
     }
     if ((false == reader.IsDBNull(_.ComAges)))
     {
         this._ComAges = reader.GetInt32(_.ComAges);
     }
     if ((false == reader.IsDBNull(_.ComPercent)))
     {
         this._ComPercent = reader.GetDecimal(_.ComPercent);
     }
     if ((false == reader.IsDBNull(_.UBoxCnt)))
     {
         this._UBoxCnt = reader.GetInt32(_.UBoxCnt);
     }
     if ((false == reader.IsDBNull(_.ChargeStartTime)))
     {
         this._ChargeStartTime = reader.GetDateTime(_.ChargeStartTime);
     }
     if ((false == reader.IsDBNull(_.ChargeEndTime)))
     {
         this._ChargeEndTime = reader.GetDateTime(_.ChargeEndTime);
     }
     if ((false == reader.IsDBNull(_.SignAmount)))
     {
         this._SignAmount = reader.GetDecimal(_.SignAmount);
     }
     if ((false == reader.IsDBNull(_.Deductible)))
     {
         this._Deductible = reader.GetDecimal(_.Deductible);
     }
     if ((false == reader.IsDBNull(_.Amount)))
     {
         this._Amount = reader.GetDecimal(_.Amount);
     }
     if ((false == reader.IsDBNull(_.ComAmount)))
     {
         this._ComAmount = reader.GetDecimal(_.ComAmount);
     }
     if ((false == reader.IsDBNull(_.Remark)))
     {
         this._Remark = reader.GetString(_.Remark);
     }
     if ((false == reader.IsDBNull(_.SalesID)))
     {
         this._SalesID = reader.GetInt32(_.SalesID);
     }
     if ((false == reader.IsDBNull(_.SalesName)))
     {
         this._SalesName = reader.GetString(_.SalesName);
     }
     if ((false == reader.IsDBNull(_.IsAudited)))
     {
         this._IsAudited = reader.GetBoolean(_.IsAudited);
     }
     if ((false == reader.IsDBNull(_.AuditedTime)))
     {
         this._AuditedTime = reader.GetDateTime(_.AuditedTime);
     }
     if ((false == reader.IsDBNull(_.AuditedByID)))
     {
         this._AuditedByID = reader.GetInt32(_.AuditedByID);
     }
     if ((false == reader.IsDBNull(_.AuditedByName)))
     {
         this._AuditedByName = reader.GetString(_.AuditedByName);
     }
     if ((false == reader.IsDBNull(_.CreatedTime)))
     {
         this._CreatedTime = reader.GetDateTime(_.CreatedTime);
     }
     if ((false == reader.IsDBNull(_.CreatedByID)))
     {
         this._CreatedByID = reader.GetInt32(_.CreatedByID);
     }
     if ((false == reader.IsDBNull(_.CreatedByName)))
     {
         this._CreatedByName = reader.GetString(_.CreatedByName);
     }
     if ((false == reader.IsDBNull(_.IsActive)))
     {
         this._IsActive = reader.GetInt32(_.IsActive);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
예제 #36
0
 public Boolean?EchoNullableBoolean(Boolean?arg0)
 {
     return(arg0);
 }
예제 #37
0
 public static void SetDialogResult(Window window, Boolean?dialogResult)
 {
     window.SetValue(DialogResultProperty, dialogResult);
 }
예제 #38
0
        public static void Write(this JsonWriter writer, JsonPropertyName propertyName, Boolean?value)
        {
            if (!value.HasValue && !writer.Settings.SerializeNulls)
            {
                return;
            }

            writer.WritePropertyName(propertyName);
            writer.WriteValue(value);
        }
예제 #39
0
        private void SetValue(IEntity entity, String name, Type type, Object value)
        {
            // 注意:name并不一定是实体类的成员
            Object oldValue = entity[name];

            if (type == null)
            {
                if (oldValue != null)
                {
                    type = oldValue.GetType();
                }
                else if (value != null)
                {
                    type = value.GetType();
                }
            }

            // 不处理相同数据的赋值
            if (Object.Equals(value, oldValue))
            {
                return;
            }

            if (type == typeof(String))
            {
                // 不处理空字符串对空字符串的赋值
                if (value != null && String.IsNullOrEmpty(value.ToString()))
                {
                    if (oldValue == null || String.IsNullOrEmpty(oldValue.ToString()))
                    {
                        return;
                    }
                }
            }
            else if (type == typeof(Boolean))
            {
                // 处理字符串转为布尔型
                if (value != null && value.GetType() == typeof(String))
                {
                    String vs = value.ToString();
                    if (String.IsNullOrEmpty(vs))
                    {
                        value = false;
                    }
                    else
                    {
                        if (Array.IndexOf(TrueString, vs.ToLower()) >= 0)
                        {
                            value = true;
                        }
                        else if (Array.IndexOf(FalseString, vs.ToLower()) >= 0)
                        {
                            value = false;
                        }
                        else if (DAL.Debug)
                        {
                            DAL.WriteLog("无法把字符串{0}转为布尔型!", vs);
                        }
                    }
                }
            }
            else if (type == typeof(Guid))
            {
                if (!(value is Guid))
                {
                    if (value is Byte[])
                    {
                        value = new Guid((Byte[])value);
                    }
                    else if (value is String)
                    {
                        value = new Guid((String)value);
                    }
                }
            }

            //不影响脏数据的状态
            Boolean?b = null;

            if (entity.Dirtys.ContainsKey(name))
            {
                b = entity.Dirtys[name];
            }

            entity[name] = value == DBNull.Value ? null : value;

            if (b != null)
            {
                entity.Dirtys[name] = b.Value;
            }
            else
            {
                entity.Dirtys.Remove(name);
            }
        }
예제 #40
0
        public static List <Novedad_CBU> Novedades_RechazadasXBanco_T(Int64?cuil, Boolean?contactado, DateTime?fechaD, DateTime?fechaH, Int64?nroNovedad, out int cantTotal)
        {
            List <Novedad_CBU> lstNovedades = new List <Novedad_CBU>();

            string    sql       = "Novedades_T_Rechazadoscbu";
            Database  db        = DatabaseFactory.CreateDatabase("DAT_V01");
            DbCommand dbCommand = db.GetStoredProcCommand(sql);

            cantTotal = 0;

            try
            {
                db.AddInParameter(dbCommand, "@cuil", DbType.Int64, cuil);
                db.AddInParameter(dbCommand, "@contactado", DbType.Boolean, contactado);
                db.AddInParameter(dbCommand, "@fechaDesde", DbType.DateTime, fechaD);
                db.AddInParameter(dbCommand, "@fechaHasta", DbType.DateTime, fechaH);
                db.AddInParameter(dbCommand, "@idnovedad", DbType.Int64, nroNovedad);
                db.AddOutParameter(dbCommand, "@cantTotal", DbType.Int32, 1);

                using (NullableDataReader dr = new NullableDataReader(db.ExecuteReader(dbCommand)))
                {
                    Novedad_CBU unaNovedad;
                    while (dr.Read())
                    {
                        unaNovedad = new Novedad_CBU(long.Parse(dr["IdNovedad"].ToString()),
                                                     DateTime.Parse(dr["nda_fecnov"].ToString()),
                                                     DateTime.Parse(dr["fechaInforme"].ToString()),
                                                     dr["nroSucursal"].ToString() + "-" + dr["denominacion"].ToString(),
                                                     dr["Usuario"].ToString(),
                                                     dr["nda_montoPrestamo"].Equals(DBNull.Value) ? 0 : double.Parse(dr.GetValue("nda_montoPrestamo").ToString()),
                                                     dr["nda_cantcuotas"].Equals(DBNull.Value) ? byte.Parse("0") : byte.Parse(dr.GetValue("nda_cantcuotas").ToString()),
                                                     dr["NombreArchivoRtaTS"].ToString(),
                                                     DateTime.Parse(dr["fRechazo"].ToString()),
                                                     dr["MensajeTS"].ToString(),
                                                     Convert.ToBoolean(dr["Contactado"].ToString()),
                                                     Convert.ToBoolean(dr["TieneHistorico"].ToString()));

                        unaNovedad.UnBeneficiario = new Beneficiario_Reducido(long.Parse(dr["nda_idBeneficiario"].ToString()),
                                                                              long.Parse(dr["Cuil"].ToString()),
                                                                              dr["ApellidoNombre"].ToString());

                        Domicilio d = new Domicilio(dr["idDomicilio"].Equals(DBNull.Value) ? (long)0 : long.Parse(dr["idDomicilio"].ToString()),
                                                    dr["calle"].ToString(), dr["numero"].ToString(), dr["piso"].ToString(), dr["depto"].ToString(), dr["codPostal"].ToString(),
                                                    dr["localidad"].ToString(), new Provincia(Convert.ToInt16(dr["codProvincia"]), dr["D_PCIA"].ToString()),
                                                    dr["telediscado1"].ToString(), dr["telefono1"].ToString(), Convert.ToBoolean(dr["esCelular1"].ToString().Equals("S") ? true : false),
                                                    dr["telediscado2"].ToString(), dr["telefono2"].ToString(), Convert.ToBoolean(dr["esCelular2"].ToString().Equals("S") ? true : false),
                                                    dr["mail"].ToString());

                        unaNovedad.UnBeneficiario.UnDomicilio = d;

                        lstNovedades.Add(unaNovedad);
                    }
                }

                cantTotal = Int32.Parse(db.GetParameterValue(dbCommand, "@cantTotal").ToString());
            }
            catch (SqlException ErrSQL)
            {
                log.Error(string.Format("{0}->{1}->Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ErrSQL.Source, ErrSQL.Message));

                if (ErrSQL.Number == 1205 || ErrSQL.Number == 1204)
                {
                    throw new ApplicationException("Interbloqueo");
                }
                else
                {
                    throw ErrSQL;
                }
            }
            catch (Exception err)
            {
                log.Error(string.Format("{0}->{1}->Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), err.Source, err.Message));
                throw err;
            }
            finally
            {
                db = null;
                dbCommand.Dispose();
            }
            return(lstNovedades);
        }
 /// <summary>
 /// Sets the AllOfferListingsConsidered property
 /// </summary>
 /// <param name="allOfferListingsConsidered">AllOfferListingsConsidered property</param>
 /// <returns>this instance</returns>
 public GetLowestOfferListingsForASINResult WithAllOfferListingsConsidered(Boolean allOfferListingsConsidered)
 {
     this.allOfferListingsConsideredField = allOfferListingsConsidered;
     return this;
 }
        /// <summary>
        /// The information for this node is initially unknown (to save load-up time).
        /// This method fills in the details.
        /// </summary>
        public void GetAttrributes()
        {
            if (IsNew)
            {
                CanHaveChildren = true;
                CanDelete = (linkedTreeNode.Nodes.Count == 0);
                return;
            }

            if (!CanHaveChildren.HasValue || !CanDelete.HasValue)
            {
                bool RemoteCanBeParent = false;
                bool RemoteCanDelete = false;

                if (TRemote.MFinance.Setup.WebConnectors.GetAccountCodeAttributes(FLedgerNumber, DetailRow.ReportingAccountCode,
                        out RemoteCanBeParent, out RemoteCanDelete, out Msg))
                {
                    CanHaveChildren = RemoteCanBeParent;
                    CanDelete = RemoteCanDelete;
                }
            }
        }
예제 #43
0
		private void MainWindow_Activated(object sender, EventArgs e) {

			if (WindowFlag == null) {
				WindowFlag = true;
				MonitorStart();
			}

		}
예제 #44
0
 /// <summary>
 /// Sets the Acknowledged property
 /// </summary>
 /// <param name="acknowledged">Acknowledged property</param>
 /// <returns>this instance</returns>
 public Report WithAcknowledged(Boolean acknowledged)
 {
     this.acknowledgedField = acknowledged;
     return this;
 }
 /// <summary>
 /// Sets the HasNext property
 /// </summary>
 /// <param name="hasNext">HasNext property</param>
 /// <returns>this instance</returns>
 public GetReportScheduleListByNextTokenResult WithHasNext(Boolean hasNext)
 {
     this.hasNextField = hasNext;
     return this;
 }
예제 #46
0
 /// <summary>
 /// Sets the HasNext property
 /// </summary>
 /// <param name="hasNext">HasNext property</param>
 /// <returns>this instance</returns>
 public GetReportRequestListResult WithHasNext(Boolean hasNext)
 {
     this.hasNextField = hasNext;
     return(this);
 }
예제 #47
0
 public WINDOWINFO(Boolean?filler)
     : this()   // Allows automatic initialization of "cbSize" with "new WINDOWINFO(null/true/false)".
 {
     cbSize = (UInt32)(Marshal.SizeOf(typeof(WINDOWINFO)));
 }
예제 #48
0
 /// <summary>
 /// 获取实体列表
 /// </summary>
 /// <param name="pageIndex">页面索引</param>
 /// <param name="pageSize">页面大小</param>
 /// <param name="recordCount">记录总数</param>
 /// <param name="ftids">主题ID列表</param>
 /// <param name="userName">发帖人</param>
 /// <param name="title">主题标题</param>
 /// <param name="type">主题类型</param>
 /// <param name="relativeID">相关ID</param>
 /// <param name="isLocked">是否锁定</param>
 /// <param name="isHide">是否隐藏</param>
 /// <param name="startDate">发帖开始时间</param>
 /// <param name="endDate">发帖结束时间</param>
 /// <returns>实体列表</returns>
 public List <ForumTopicEntity> GetEntities(Int32 pageIndex, Int32 pageSize, Int32 recordCount, String ftids, String userName, String title, ForumTopicType?type, Int32 relativeID, Boolean?isLocked, Boolean?isHide, DateTime?startDate, DateTime?endDate)
 {
     return(this.Select()
            .Paged(pageSize, pageIndex, recordCount)
            .Querys(TOPICID, USERNAME, TITLE, TYPE, ISLOCKED, ISHIDE, RELATIVEID, LASTDATE)
            .Where(ftids, userName, title, type, relativeID, isLocked, isHide, startDate, endDate)
            .OrderByDesc(LASTDATE)
            .ToEntityList(this));
 }
예제 #49
0
 protected void LButtonforClear_Click(object sender, EventArgs e)
 {
     toggleTBSort(false);
     whichSort = null;
 }
예제 #50
0
 /// <summary>
 /// 获取实体总数
 /// </summary>
 /// <param name="ftids">主题ID列表</param>
 /// <param name="userName">发帖人</param>
 /// <param name="title">主题标题</param>
 /// <param name="type">主题类型</param>
 /// <param name="relativeID">相关ID</param>
 /// <param name="isLocked">是否锁定</param>
 /// <param name="isHide">是否隐藏</param>
 /// <param name="startDate">发帖开始时间</param>
 /// <param name="endDate">发帖结束时间</param>
 /// <returns>实体总数</returns>
 public Int32 CountEntities(String ftids, String userName, String title, ForumTopicType?type, Int32 relativeID, Boolean?isLocked, Boolean?isHide, DateTime?startDate, DateTime?endDate)
 {
     return(this.Select()
            .Where(ftids, userName, title, type, relativeID, isLocked, isHide, startDate, endDate)
            .Count());
 }
예제 #51
0
 protected void LButtonforSelectionSort_Click(object sender, EventArgs e)
 {
     toggleTBSort(true);
     whichSort = false;
 }
예제 #52
0
 /// <summary>
 /// Sets the ShippedByAmazonTFM property
 /// </summary>
 /// <param name="shippedByAmazonTFM">ShippedByAmazonTFM property</param>
 /// <returns>this instance</returns>
 public Order WithShippedByAmazonTFM(Boolean shippedByAmazonTFM)
 {
     this.shippedByAmazonTFMField = shippedByAmazonTFM;
     return(this);
 }
예제 #53
0
 public void CloseAction()
 {
     DialogResult = true;
     DialogResult = false;
 }
예제 #54
0
 protected Type(String Name, Boolean?PubliclyVisible, Boolean?PrivateDefinition) : this(Name) {
     this.PubliclyVisible   = PubliclyVisible;
     this.PrivateDefinition = PrivateDefinition;
 }
예제 #55
0
 /// <summary>
 /// Sets the PurgeAndReplace property
 /// </summary>
 /// <param name="purgeAndReplace">PurgeAndReplace property</param>
 /// <returns>this instance</returns>
 public SubmitFeedRequest WithPurgeAndReplace(Boolean purgeAndReplace)
 {
     this.purgeAndReplaceField = purgeAndReplace;
     return(this);
 }
예제 #56
0
    void InitContent()
    {
        if (Ready.HasValue && Ready.Value)
        {
            return;
        }

        introIcon       = Resources.Load <Texture2D>("icons_welcome/information");
        releaseIcon     = Resources.Load <Texture2D>("icons_welcome/documentation");
        photonCloudIcon = Resources.Load <Texture2D>("PhotonCloudIcon");

        boltIcon = Resources.Load <Texture2D>("BoltIcon");

        activeIcon   = Resources.Load <Texture2D>("icons_welcome/bullet_green");
        inactiveIcon = Resources.Load <Texture2D>("icons_welcome/bullet_black");

        Texture2D texture = new Texture2D(1, 1);

        texture.SetPixel(0, 0, Color.gray);
        texture.Apply();

        Color headerTextColor = EditorGUIUtility.isProSkin
            ? new Color(0xf2 / 255f, 0xad / 255f, 0f)
            : new Color(30 / 255f, 99 / 255f, 183 / 255f);
        Color commonTextColor = EditorGUIUtility.isProSkin ? Color.white : Color.black;

        introStyle = new GUIStyle(EditorStyles.helpBox)
        {
            fontSize = 15,
            padding  = new RectOffset(10, 10, 10, 10),
            normal   =
            {
                textColor = commonTextColor
            }
        };

        stepStyle = new GUIStyle(EditorStyles.helpBox)
        {
            padding = new RectOffset(10, 10, 10, 10),
            margin  = new RectOffset(0, 0, 5, 0),
            normal  =
            {
                textColor = commonTextColor
            }
        };

        headerLabel = new GUIStyle(EditorStyles.boldLabel)
        {
            padding = new RectOffset(10, 0, 0, 0),
            margin  = new RectOffset(),
            normal  =
            {
                textColor = commonTextColor
            }
        };

        headerStyle = new GUIStyle(EditorStyles.boldLabel)
        {
            fontSize = 14,
            margin   = new RectOffset(),
            padding  = new RectOffset(10, 0, 0, 0),
            normal   =
            {
                textColor = commonTextColor
            }
        };

        headerLargeLabel = new GUIStyle(EditorStyles.boldLabel)
        {
            padding  = new RectOffset(10, 0, 0, 0),
            margin   = new RectOffset(),
            fontSize = 18,
            normal   =
            {
                textColor = headerTextColor
            }
        };

        textLabel = new GUIStyle()
        {
            wordWrap = true,
            margin   = new RectOffset(),
            padding  = new RectOffset(10, 0, 0, 0),
            normal   =
            {
                textColor = commonTextColor
            }
        };

        centerInputText = new GUIStyle(GUI.skin.textField)
        {
            alignment   = TextAnchor.MiddleCenter,
            fontSize    = 12,
            fixedHeight = 26
        };

        minimalButton = new GUIStyle(EditorStyles.miniButton)
        {
            fixedWidth = 130
        };

        simpleButton = new GUIStyle(GUI.skin.button)
        {
            fontSize = 12,
            padding  = new RectOffset(10, 10, 10, 10)
        };

        iconSection = new GUIStyle
        {
            margin = new RectOffset(0, 0, 0, 0)
        };

        discordIcon   = Resources.Load <Texture2D>("icons_welcome/community");
        discordText   = new GUIContent(BoltWizardText.DISCORD_TEXT);
        discordHeader = new GUIContent(BoltWizardText.DISCORD_HEADER);

        bugtrackerIcon   = Resources.Load <Texture2D>("icons_welcome/bugtracker");
        bugtrackerText   = new GUIContent(BoltWizardText.BUGTRACKER_TEXT);
        bugtrackerHeader = new GUIContent(BoltWizardText.BUGTRACKER_HEADER);

        documentationIcon   = Resources.Load <Texture2D>("icons_welcome/documentation");
        documentationText   = new GUIContent(BoltWizardText.DOCUMENTATION_TEXT);
        documentationHeader = new GUIContent(BoltWizardText.DOCUMENTATION_HEADER);

        reviewIcon   = Resources.Load <Texture2D>("icons_welcome/comments");
        reviewText   = new GUIContent(BoltWizardText.REVIEW_TEXT);
        reviewHeader = new GUIContent(BoltWizardText.REVIEW_HEADER);

        samplesIcon = Resources.Load <Texture2D>("icons_welcome/samples");

        // Package List

        packageInfo = new Dictionary <BoltInstalls, BoltPackage>
        {
            {
                BoltInstalls.Core,
                new BoltPackage()
                {
                    name         = "bolt_install",
                    title        = "Core Package",
                    description  = "Install core bolt package",
                    installTest  = MainPackageInstalled,
                    packageFlags = PackageFlags.RunInitialSetup
                }
            },

            // {
            //  BoltInstalls.Mobile,
            //  new BoltPackage()
            //  {
            //      name = "bolt_mobile_plugins",
            //      title = "Mobile Plugins",
            //      installTest = MobilePackageInstalled,
            //      description = "Install iOS / Android socket plugins"
            //  }
            // },

            {
                BoltInstalls.XB1,
                new BoltPackage()
                {
                    name        = "bolt_xb1",
                    title       = "XBox One",
                    installTest = XB1PackageInstalled,
                    description = "Install XB1 support"
                }
            },

            {
                BoltInstalls.PS4,
                new BoltPackage()
                {
                    name        = "bolt_ps4",
                    title       = "Playstation 4",
                    installTest = PS4PackageInstalled,
                    description = "Install PS4 support"
                }
            },

            {
                BoltInstalls.Samples,
                new BoltPackage()
                {
                    name         = "bolt_samples",
                    title        = "Samples",
                    description  = "Install bolt samples",
                    installTest  = SamplesPackageInstalled,
                    packageFlags = PackageFlags.WarnForProjectOverwrite
                }
            }
        };

        // App ID
        if (string.IsNullOrEmpty(BoltRuntimeSettings.instance.photonAppId))
        {
            AppIdOrEmail = "";
        }
        else if (IsAppId(BoltRuntimeSettings.instance.photonAppId))
        {
            AppIdOrEmail = BoltRuntimeSettings.instance.photonAppId;
        }

        Ready       = true;
        RunCompiler = false;
    }
 /// <summary>
 /// Sets the HasNext property
 /// </summary>
 /// <param name="hasNext">HasNext property</param>
 /// <returns>this instance</returns>
 public GetReportListResult WithHasNext(Boolean hasNext)
 {
     this.hasNextField = hasNext;
     return this;
 }
예제 #58
0
 public void setUseMnmonic(Boolean useMnmonic)
 {
     this.useMnmonic = useMnmonic;
 }
 /// <summary>
 /// Sets the Acknowledged property
 /// </summary>
 /// <param name="acknowledged">Acknowledged property</param>
 /// <returns>this instance</returns>
 public UpdateReportAcknowledgementsRequest WithAcknowledged(Boolean acknowledged)
 {
     this.acknowledgedField = acknowledged;
     return this;
 }
예제 #60
0
 public void setUseWaitCursor(Boolean useWaitCursor)
 {
     this.useWaitCursor = useWaitCursor;
 }