private string GetValue(IExcelDataReader reader, FieldNames fieldName, SheetConfig config) { var index = GetFieldIndex(fieldName, config); var negate = IsFieldValueNegate(fieldName, config); return(Utils.GetValue(reader, index, negate).TrimWhiteSpace()); }
public GameStateHelper() { FieldNames.AddRange(new List <string>() { "LichState" }); }
private void Fillter() { string val_Fillter = string.Empty; listSpecialization = new List <Specialization>(); listSpecialization = db.Specializations.ToList(); if (CollegeF.SelectedIndex != 0) { int id = int.Parse(CollegeF.SelectedValue.ToString()); listSpecialization = listSpecialization.Where(x => x.Collage_Id == id).ToList(); val_Fillter += "<strong>" + FieldNames.getFieldName("FormSpecialization-College", "College") + " : </strong>" + CollegeF.SelectedItem + " , "; } if (Keyword.Text.Trim() != "") { listSpecialization = listSpecialization.Where(x => (x.Specialization_Name_Ar != null && x.Specialization_Name_Ar.Contains(Keyword.Text.Trim())) || (x.Specialization_Name_En != null && x.Specialization_Name_En.Contains(Keyword.Text.Trim()))).ToList(); val_Fillter += "<strong>" + FieldNames.getFieldName("FormSpecialization-Keyword", "Keyword") + " : </strong>" + Keyword.Text + " , "; } // Create the details of fillter text if (val_Fillter != string.Empty) { val_Fillter = val_Fillter.Substring(0, val_Fillter.Length - 3); FilterUsed.Text = val_Fillter + ""; } else { FilterUsed.Text = ""; } UserCard(); }
protected void Page_Load(object sender, EventArgs e) { if (SessionWrapper.LoggedUser == null) { Response.Redirect("~/Pages/Setting/Auth/Login.aspx"); } int EmpStructureID = SessionWrapper.EmpStructure; int UserID = SessionWrapper.LoggedUser.Employee_Id; treatmentList = db.Treatment_Master.Where(x => x.From_Employee_Structure_Id == EmpStructureID).ToList(); treatmentDList = db.Treatment_Detial.Where(x => x.To_Employee_Structure_Id == EmpStructureID).ToList(); for (int i = 0; i < treatmentDList.Count; i++) { Treatment_Master treat = treatmentList.FirstOrDefault(x => x.Treatment_Id == treatmentDList[i].Treatment_Id); if (treat == null) { treatmentDList[i].Treatment_Master.Treatment_Keywork = "inbox"; treatmentList.Add(treatmentDList[i].Treatment_Master); } } treatmentList = treatmentList.OrderByDescending(x => x.Create_Date).ToList(); structureList = db.Structures.ToList(); btnSearch.Text = FieldNames.getFieldName("AdvancedSearch-Search", "Search"); if (!IsPostBack) { FillDropDownLists(); //LoadTable(); } }
public StatusMessage(Severity severity, string message, params string[] fieldNames) : this(severity, message) { foreach (string fieldName in fieldNames) { FieldNames.Add(fieldName); } }
protected void Page_Load(object sender, EventArgs e) { if (SessionWrapper.LoggedUser == null) { Response.Redirect("~/Pages/Auth/Login.aspx"); } if (Request["StudentID"] == null) { Response.Redirect("~/Pages/RegistrationProcess/ListView.aspx"); } else { student_record_id = int.Parse(Request["StudentID"].ToString()); } if (!IsPostBack) { //Fill Employee DropDown List FillEmployeeDropDown(); //Get Current student Record Student student = db.Students.Find(student_record_id); //Get Current student information LoadStudentInfo(student); //Rename button names btnAssign.Text = FieldNames.getFieldName("View-Assign", "Assign"); } }
private void FillNames() { for (int i = 0; i < Rows.First().Length; i++) { FieldNames.Add("Column " + i); } }
public GameStateHelper() { FieldNames.AddRange(new List <string>() { "GenderChangeCounter", }); }
private void translateArabic() { if (SessionWrapper.LoggedUser.Language_id != null) { if (SessionWrapper.LoggedUser.Language_id == 1) { txtResource_Name.Attributes["placeholder"] = "الإسم عربي"; RFVtxtResource_Name.Text = "أدخل الإسم العربي"; txtResource_Name_En.Attributes["placeholder"] = "الإسم إنجليزي"; RFVtxtResource_Name_En.Text = "أدخل الإسم بالإنجليزي"; Save.Text = "حفظ"; ResourceGridView.Columns[0].Caption = FieldNames.getFieldName("FormCollege-ID", "الرقم"); ResourceGridView.Columns[1].Caption = FieldNames.getFieldName("FormCollege-ArabicName", "الإسم عربي"); ResourceGridView.Columns[2].Caption = FieldNames.getFieldName("FormCollege-Action", "الاكشن"); ResourceGridView.Columns[3].Caption = FieldNames.getFieldName("FormCollege-EnglishName", "الإسم إنجليزي"); } else { txtResource_Name.Attributes["placeholder"] = "Arabic Name"; RFVtxtResource_Name.Text = "Enter Name Arabic"; txtResource_Name_En.Attributes["placeholder"] = "English Name"; RFVtxtResource_Name_En.Text = "Enter Name English"; Save.Text = "Save"; ResourceGridView.Columns[0].Caption = FieldNames.getFieldName("FormCollege-ID", "ID"); ResourceGridView.Columns[1].Caption = FieldNames.getFieldName("FormCollege-ArabicName", "Arabic Name"); ResourceGridView.Columns[2].Caption = FieldNames.getFieldName("FormCollege-Action", "Action"); ResourceGridView.Columns[3].Caption = FieldNames.getFieldName("FormCollege-EnglishName", "English Name"); } } }
/// <summary> /// Creating log record and saving it to DB /// </summary> private void NewAuditRecord(Item curentity, string fieldName, string newValue, string oldValue, AuditRecordType operationType) { string entityType = curentity.GetType().ToString(); string stringTableName = entityType.Substring(entityType.LastIndexOf('.') + 1); ItemTypes tableName = ItemTypes.Undefined; Enum.TryParse(stringTableName, true, out tableName); FieldNames enumFieldName = FieldNames.Undefined; Enum.TryParse(fieldName, true, out enumFieldName); AuditLog record = new AuditLog() { AuditID = Guid.NewGuid(), EntityID = curentity.Id, AuditDate = DateTime.Now, User = currentUser.Id, TableName = tableName, FieldName = enumFieldName, NewValue = newValue, OldValue = oldValue, OwnerId = curentity.OwnerId, OperationType = operationType }; LogRepo.BeginTransaction(); LogRepo.Save(record); LogRepo.Commit(); LogRepo.Evict(record); }
private void Change_LablesName_BasedOn_Language() { try { // Group Grid View GroupGridView.Columns[0].Caption = FieldNames.getFieldName("PermissionGroups-ID", "ID"); GroupGridView.Columns[1].Caption = FieldNames.getFieldName("PermissionGroups-ArabicName", "Arabic Name"); GroupGridView.Columns[2].Caption = FieldNames.getFieldName("PermissionGroups-Action", "Action"); GroupGridView.Columns[3].Caption = FieldNames.getFieldName("PermissionGroups-EnglishName", "English Name"); // Permission Grid View PermissionGroupGridView.Columns[0].Caption = FieldNames.getFieldName("PermissionGroups-ID", "ID"); PermissionGroupGridView.Columns[1].Caption = FieldNames.getFieldName("PermissionGroups-PermissionID", "Permission ID"); PermissionGroupGridView.Columns[2].Caption = FieldNames.getFieldName("PermissionGroups-ArabicName", "Arabic Name"); PermissionGroupGridView.Columns[3].Caption = FieldNames.getFieldName("PermissionGroups-EnglishName", "English Name"); PermissionGroupGridView.Columns[4].Caption = FieldNames.getFieldName("PermissionGroups-URLPath", "URL Path"); // Status Grid View StatusGridView.Columns[0].Caption = FieldNames.getFieldName("PermissionGroups-ID", "ID"); StatusGridView.Columns[2].Caption = FieldNames.getFieldName("PermissionGroups-ArabicName", "Arabic Name"); StatusGridView.Columns[3].Caption = FieldNames.getFieldName("PermissionGroups-EnglishName", "English Name"); StatusGridView.Columns[4].Caption = FieldNames.getFieldName("PermissionGroups-Code", "Code"); // Save Button SaveChanges.Text = FieldNames.getFieldName("PermissionGroups-Save", "Save"); } catch { } }
private void fillDataTableWithArgs() { string order = ""; if (!_order.Equals("")) { order = " order by [" + _order; if (_increasing) { order += "] ASC"; } else { order += "] DESC "; } } try { using (_db = new NmdMobileDBAdapter(this)) { _db.OpenOrCreateDatabase(((SharedEnviroment)ApplicationContext).ActionArgument); _db.BeginTransaction(); res = _db.getSQLQueryPage(sql, offset, limit, _cont, FieldNames.ToArray(), _where, order); _db.EndTransaction(); } setTitles(_aTable, FieldDisplayNames.ToArray()); appendRows(_aTable, res); } catch (Exception ex) { ExceptionHandler.toastMsg(this, ex.Message); ExceptionHandler.logDActivity(ex.ToString(), _logging, TAG); } }
public GameStateHelper() { FieldNames.AddRange(new List <string>() { "Trollsfire", "BookWarning", }); }
public GameStateHelper() { FieldNames.AddRange(new List <string>() { "MedallionCharges", "SlimeBlasts", }); }
public Int32 GetFieldIndex(String name) { if (FieldNames.ContainsKey(name)) { return(FieldNames[name].Index); } throw new ArgumentOutOfRangeException("The header row doesn't contain field name '" + name + "'."); }
public GameStateHelper() { FieldNames.AddRange(new List <string>() { "QueenGiftEffectUid", "QueenGiftArtifactUid", "SpookCounter", }); }
/// <inheritdoc /> public IdentifierValueOutputFormatter( IEnumerable <IdentifierDefinition> definitions, IEnumerable <string[]> fieldNames) { FieldNames = fieldNames.ToLookup(_ => _.First(), _ => _.Skip(1).ToArray()); var topLevelFieldNames = FieldNames.Select(_ => _.Key).ToArray(); IdentifierDefinitions = GetDefinitionsInOutputOrder(definitions, topLevelFieldNames); CreateWriterForDefinitions(); }
public InsertCommandBuilder Clear() { CommandParameters.Clear(); FieldNames.Clear(); OutputFields.Clear(); FieldValues.Clear(); Table = string.Empty; TemporaryTable = string.Empty; return(this); }
/// <summary> /// Returns the field value as a string for the given field name. /// </summary> /// <param name="column">field name enumerator to get the string value for</param> /// <returns>Returns the field value as a string for the given field enum.</returns> protected virtual string GetFieldValue(FieldNames column) { int col = GetColumnNumber(column); if (col < 0) { return(null); } return(col >= Fields.Length ? null : Fields[col]); }
/// <summary>Checks whether all fields used at options are present and adds them if not.</summary> /// <param name="option">Options to check.</param> public void CheckFieldsPresent(ResultOption option) { foreach (var fieldName in option.FieldNames) { if (!FieldNames.Contains(fieldName)) { FieldNames.Add(fieldName); } } }
///<summary>Creates an AdvancedColumnsBehavior.</summary> ///<param name="name">The name of the column set to show in the context menu.</param> ///<param name="fieldNames">The names of the fields to toggle.</param> public AdvancedColumnsBehavior(string name, IEnumerable <string> fieldNames) { if (fieldNames == null) { throw new ArgumentNullException("fieldNames"); } FieldNames = fieldNames.ReadOnlyCopy(); Name = name ?? FieldNames.Join(", "); }
public GameStateHelper() { FieldNames.AddRange(new List <string>() { "WanderingMonster", "DwLoopCounter", "WandCharges", "Regenerate", "KeyRingRoomUid", }); }
protected void Page_Load(object sender, EventArgs e) { //Permission_Group group = db.Permission_Group.First(); if (!IsPostBack) { FillGroupPermission(); Change_LablesName_BasedOn_Language(); Save.Text = FieldNames.getFieldName("PermissionGroups-Save", "Save"); } }
private bool IsFieldValueNegate(FieldNames fieldName, SheetConfig config) { var name = Enum.GetName(typeof(FieldNames), fieldName); var field = config.Fields.FirstOrDefault(f => f.Name == name); if (field == null) { return(false); } return(field.NegateValue); }
public UpdateCommandBuilder Clear() { CommandParameters.Clear(); FieldNames.Clear(); FieldValues.Clear(); OutputFields.Clear(); Table = string.Empty; TemporaryTable = string.Empty; _whereBuilder.Clear(); return(this); }
public GameStateHelper() { FieldNames.AddRange(new List <string>() { "DreamCounter", "SwarmyCounter", "CargoOpenCounter", "CargoInRoom", "GiveAmazonMoney", }); }
private int?GetFieldIndex(FieldNames fieldName, SheetConfig config) { var name = Enum.GetName(typeof(FieldNames), fieldName); var field = config.Fields.FirstOrDefault(f => f.Name == name); if (field == null) { return(null); } return(ExcelUtils.ColumnToIndex(field.Column)); }
private void Fillter() { string val_Fillter = string.Empty; if (StructureF.SelectedIndex != 0) { int id = int.Parse(StructureF.SelectedValue.ToString()); ALLEmployees = (from s in ALLEmployees join sl in db.Employee_Structure on s.Employee_Id equals sl.Employee_Id where sl.Structure_Id == id select s).ToList(); //ALLEmployees = ALLEmployees.Where(x => x.Employee_Signature.Where(f=> f.)).ToList(); val_Fillter += "<strong>" + FieldNames.getFieldName("Employees-Structure", "Structure") + " : </strong>" + StructureF.SelectedItem + " , "; } if (GroupF.SelectedIndex != 0) { int id = int.Parse(GroupF.SelectedValue.ToString()); ALLEmployees = ALLEmployees.Where(x => x.Group_Id == id).ToList(); val_Fillter += "<strong>" + FieldNames.getFieldName("Employees-Group", "Group") + " : </strong>" + GroupF.SelectedItem + " , "; } if (LanguageF.SelectedIndex != 0) { int id = int.Parse(LanguageF.SelectedValue.ToString()); ALLEmployees = ALLEmployees.Where(x => x.Language_id == id).ToList(); val_Fillter += "<strong>" + FieldNames.getFieldName("Employees-Language", "Language") + " : </strong>" + LanguageF.SelectedItem + " , "; } if (ActiveF.Value != null) { ALLEmployees = ALLEmployees.Where(x => x.Employee_Active == ActiveF.Checked).ToList(); val_Fillter += "<strong>" + FieldNames.getFieldName("Employees-Active", "Active") + " : </strong>" + ActiveF.Checked + " , "; } if (Keyword.Text.Trim() != "") { ALLEmployees = ALLEmployees.Where(x => (x.Employee_Name_Ar != null && x.Employee_Name_Ar.Contains(Keyword.Text.Trim())) || (x.Employee_Name_En != null && x.Employee_Name_En.Contains(Keyword.Text.Trim())) || (x.Employee_Email != null && x.Employee_Email.Contains(Keyword.Text.Trim())) || (x.Employee_Phone != null && x.Employee_Phone.Contains(Keyword.Text.Trim()))).ToList(); val_Fillter += "<strong>" + FieldNames.getFieldName("AdvancedSearch-Keyword", "Keyword") + " : </strong>" + Keyword.Text + " , "; } // Create the details of fillter text if (val_Fillter != string.Empty) { val_Fillter = val_Fillter.Substring(0, val_Fillter.Length - 3); FilterUsed.Text = val_Fillter + ""; } else { FilterUsed.Text = ""; } UserCard(); }
protected void Page_Load(object sender, EventArgs e) { Session["IsECMS"] = false; if (SessionWrapper.LoggedUser == null) { Response.Redirect("~/Pages/Setting/Auth/Login.aspx"); } string path_and_query = HttpContext.Current.Request.Url.PathAndQuery; path_and_query = HttpUtility.UrlEncode(path_and_query); txtlockscreen.Text = "<a href='../../../../Pages/Setting/Auth/LockScreen.aspx?URL=" + path_and_query + "'>" + "<i class='feather icon-lock'></i> " + FieldNames.getFieldName("Master-LockScreen", "Lock Screen") + "</a>"; if (SessionWrapper.LoggedUser.Language_id == 1) { Style.Text = FieldNames.getSTyleRTL(); StyleEminutes.Text = FieldNames.getSTyleRTLEminutes(); //Script.Text = FieldNames.getJavaScriptRTL(); //this.html.Attributes.Add("dir", "ltr"); //Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "RTL_Layout();", true); } if (!IsPostBack) { List <Permission> Permission_List = new List <Permission>(); List <Permission_Group> Per_group = db.Permission_Group.Where(x => x.Group_Id == SessionWrapper.LoggedUser.Group_Id).ToList(); Permission_List.Clear(); for (int j = 0; j < Per_group.Count; j++) { int per_id = (int)Per_group[j].Permission_Id; Permission per = db.Permissions.Where(x => x.Permission_Id == per_id && x.System_Id != 2).FirstOrDefault(); if (per != null) { Permission_List.Add(per); } } List <M_Board> ListBoardTemp = db.M_Board.ToList(); List <M_Board> ListBoard = new List <M_Board>(); for (int i = 0; i < ListBoardTemp.Count; i++) { M_Board_Member BM = ListBoardTemp[i].M_Board_Member.Where(x => x.Employee_Id == SessionWrapper.LoggedUser.Employee_Id).FirstOrDefault(); if (BM != null) { ListBoard.Add(ListBoardTemp[i]); } } Employee_Name(); MargeBoardToMenu(Permission_List, ListBoard); } }
private void Change_LablesName_BasedOn_Language() { try { // Language GridView LanguageGridView.Columns[0].Caption = FieldNames.getFieldName("Language-Action", "Action"); LanguageGridView.Columns[1].Caption = FieldNames.getFieldName("Language-ID", "ID"); LanguageGridView.Columns[2].Caption = FieldNames.getFieldName("Language-FieldName", "Field Name"); LanguageGridView.Columns[3].Caption = FieldNames.getFieldName("Language-Value", "Value"); LanguageGridView.Columns[4].Caption = FieldNames.getFieldName("Language-Language", "Language"); } catch { } }
/// <summary> /// Returns the field value as a string for the given field name. /// </summary> /// <param name="column">field name enumerator to get the string value for</param> /// <returns>Returns the field value as a string for the given field enum.</returns> protected virtual string GetFieldValue (FieldNames column) { int col = GetColumnNumber(column); if (col < 0) return null; return col >= Fields.Length ? null : Fields[col]; }
/// <summary> /// Returns the column number for the given field name /// </summary> /// <param name="column">Snp field enumerator to get the column number for</param> /// <returns>Returns the column number for the given Snp field enum.</returns> private int GetColumnNumber (FieldNames column) { switch (column) { case FieldNames.Chromosome: return ChromosomeColumn; case FieldNames.Position: return PositionColumn; case FieldNames.AlleleOne: return AlleleOneColumn; case FieldNames.AlleleTwo: return AlleleTwoColumn; default: return -1; } }
public string getValue(FieldNames whichElement) { switch (whichElement) { case FieldNames.Nothing: return ""; //case FieldNames.Label: // return label; case FieldNames.isInPath: return IsInPath.ToString(); case FieldNames.isWalkable: return IsWalkable.ToString(); case FieldNames.isCombatWalkable: return IsCombatWalkable.ToString(); case FieldNames.allowLOS: return AllowLOS.ToString(); //case FieldNames.color: // return color.ToString(); case FieldNames.speed: return Speed.ToString(); case FieldNames.coordinates: return String.Format("{0},{1}", X, Y); case FieldNames.PathFindingInformations: return DistanceSteps.ToString(); case FieldNames.mapLink: return MapLink.ToString(); case FieldNames.cellID: return this.CellId.ToString(); //case FieldNames.firstGfx: // return this.firstGfx.ToString(); //case FieldNames.gfxCount: // return this.gfxCount.ToString(); default: return "???"; } }