public GroupInfo3(int groupId, string img) : base(groupId) { TkDebug.AssertArgumentNullOrEmpty(img, "img", null); Img = img; }
/// <summary> /// Initializes a new instance of the SubFuncOperateRight class. /// </summary> /// <param name="functionKey"></param> public SubFuncOperateRight(string functionKey) { TkDebug.AssertArgumentNullOrEmpty(functionKey, "functionKey", null); FunctionKey = functionKey; }
public bool IsKey(string nickName) { TkDebug.AssertArgumentNullOrEmpty(nickName, "nickName", this); return(fKeyFieldInfos.Contains(nickName)); }
private static IPageTemplate CreatePageTemplate(string regName) { TkDebug.AssertArgumentNullOrEmpty(regName, "regName", null); return(PlugInFactoryManager.CreateInstance <IPageTemplate>(PageTemplatePlugInFactory.REG_NAME, regName)); }
public bool ContainsKey(string regName) { TkDebug.AssertArgumentNullOrEmpty(regName, "regName", this); return(fData.ContainsKey(regName)); }
public string GetDisplayName(string nickName) { TkDebug.AssertArgumentNullOrEmpty(nickName, "nickName", this); return(GetFieldInfo(nickName).DisplayName); }
string ISqlProvider.EscapeName(string name) { TkDebug.AssertArgumentNullOrEmpty(name, "name", this); return(string.Format(ObjectUtil.SysCulture, "`{0}`", name)); }
public WebExceptionResult(string errorPath) { TkDebug.AssertArgumentNullOrEmpty(errorPath, "errorPath", null); Result = ActionResultData.CreateFailResult(errorPath); }
//数据有效性以及下拉框的设置 private static HSSFDataValidation CreateDataValidation(int index, Tk5FieldInfoEx fieldInfo, ICellStyle styleContent, HSSFWorkbook workbook) { IDataFormat format = workbook.CreateDataFormat(); CellRangeAddressList region = new CellRangeAddressList(1, 65535, index, index); DVConstraint constraint = null; HSSFDataValidation dataValidation = null; if (fieldInfo.Decoder != null && fieldInfo.Decoder.Type == DecoderType.CodeTable) { IEnumerable <IDecoderItem> data = GetDecoderItem(fieldInfo); if (data != null) { List <string> optionList = new List <string>(); foreach (IDecoderItem item in data) { if (item != null) { TkDebug.AssertArgumentNullOrEmpty(item.Name, "item.Name", null); optionList.Add(item.Name); } } constraint = DVConstraint.CreateExplicitListConstraint(optionList.ToArray()); dataValidation = DisplayMsg(region, constraint, "请从下拉框选项中选择"); } } else { if (fieldInfo.InternalControl != null && fieldInfo.InternalControl.SrcControl == ControlType.CheckBox) { constraint = DVConstraint.CreateExplicitListConstraint(new string[] { "√" }); dataValidation = DisplayMsg(region, constraint, "请在下拉框选项中进行选择"); } else { switch (fieldInfo.DataType) { case TkDataType.DateTime: case TkDataType.Date: if (fieldInfo.DataType == TkDataType.DateTime) { styleContent.DataFormat = format.GetFormat("yyyy-MM-dd HH:mm"); } else { styleContent.DataFormat = format.GetFormat("yyyy-MM-dd"); } constraint = DVConstraint.CreateDateConstraint(6, "1900-01-01", null, "yyyy-MM-dd"); dataValidation = DisplayMsg(region, constraint, "请输入一个日期类型的值"); break; case TkDataType.Double: case TkDataType.Decimal: case TkDataType.Money: constraint = DVConstraint.CreateNumericConstraint(2, 1, "1", "0"); dataValidation = DisplayMsg(region, constraint, "请输入数值类型的值"); styleContent.DataFormat = format.GetFormat("0"); break; case TkDataType.Long: case TkDataType.Int: case TkDataType.Short: case TkDataType.Byte: case TkDataType.Bit: constraint = DVConstraint.CreateNumericConstraint(1, 1, "1", "0"); dataValidation = DisplayMsg(region, constraint, "请输入一个整数"); styleContent.DataFormat = format.GetFormat("0"); break; default: styleContent.DataFormat = format.GetFormat("@"); break; } } } return(dataValidation); }
void IListSqlContext.JoinSql(string format) { TkDebug.AssertArgumentNullOrEmpty(format, "format", this); fListSql = string.Format(ObjectUtil.SysCulture, format, fListSql); }
public static string GetTemplateFile(string fileName) { TkDebug.AssertArgumentNullOrEmpty(fileName, nameof(fileName), null); return($"^{Path.Combine(TemplateName, fileName)}"); }
public void SetUser(string userId) { TkDebug.AssertArgumentNullOrEmpty(userId, "userId", this); ToUser = userId; }
internal WeixinSettings(WeixinXml xml) { AppId = xml.Weixin.AppId; LogRawMessage = xml.Weixin.LogRawMessage; WeixinPath = Path.GetDirectoryName(xml.FullPath); UseLogOnRight = xml.Weixin.UseLogOnRight; WeixinNormalConfig normalConfig = xml.Weixin.Normal; if (normalConfig != null) { Mode = WeixinMode.Normal; OpenId = normalConfig.OpenId; fAppSecret = normalConfig.Secret; fToken = normalConfig.Token; MessageMode = normalConfig.MessageMode; EncodingAESKey = normalConfig.EncodingAESKey; fTemplateMessages = normalConfig.TemplateMessages; PaymentConfigItem pay = normalConfig.Pay; if (pay != null) { fUsePay = true; fMchId = pay.MchId; fPayKey = pay.Key; fDeviceInfo = pay.DeviceInfo; fDeviceIp = pay.DeviceIp; fPayNotifyUrl = UriUtil.CombineUri(pay.NotifyBaseUrl, pay.NotifyUrl).ToString(); } WeixinServiceConfigItem service = normalConfig.Service; if (service != null) { fEnableService = service.Enabled; fWeixinAccount = service.WeixinAccount; } else { fEnableService = false; } if (MessageMode != MessageMode.Normal) { TkDebug.AssertArgumentNullOrEmpty(EncodingAESKey, "当消息是混合或者安全模式时,请配置EncodingAESKey的内容", xml); } } else if (xml.Weixin.CorpApps != null) { Mode = WeixinMode.Corporation; fCorpApps = xml.Weixin.CorpApps; TkDebug.Assert(fCorpApps.Count > 0, "至少需要配置一个tk:CorpApp节点", xml); CorpSecretConfig corpSecret = xml.Weixin.CorpSecret; TkDebug.AssertNotNull(corpSecret, "需要配置tk:CorpSecret节点", xml); fCorpUserManagerSecret = corpSecret.UserManager; fCorpMenuSecret = corpSecret.Menu; if (string.IsNullOrEmpty(fCorpMenuSecret)) { fCorpMenuSecret = fCorpUserManagerSecret; } OpenId = AppId; } else { TkDebug.ThrowImpossibleCode(xml); } fCurrent = this; }
string IDbProvider.GetParamName(string fieldName, bool isOrigin) { TkDebug.AssertArgumentNullOrEmpty(fieldName, "fieldName", this); return(GetParamName(fieldName, isOrigin)); }
public bool IsSectionDefined(string name) { TkDebug.AssertArgumentNullOrEmpty(name, nameof(name), this); return(SectionWriters.ContainsKey(name)); }
public void Add(string id, int count) { TkDebug.AssertArgumentNullOrEmpty(id, "id", this); TabList.Add(new TabItemCount(id, count)); }
/// <summary> /// 根据SQL条件语句填充数据 /// </summary> /// <param name="whereClause">SQL的条件子句</param> public void Select(string whereClause) { TkDebug.AssertArgumentNullOrEmpty(whereClause, "whereClause", this); Select(ParamBuilder.CreateSql(whereClause)); }
public WeMediaId(string mediaId) { TkDebug.AssertArgumentNullOrEmpty(mediaId, "mediaId", null); MediaId = mediaId; }
public void Add(string fieldName, TkDataType dataType, object fieldValue) { TkDebug.AssertArgumentNullOrEmpty(fieldName, "fieldName", this); List.Add(new DbParameter(fieldName, dataType, fieldValue)); }