public XtraDictionaryEditMunitForm(XtraDictionaryMunitControl parentMunitControl, municipality munit) : base() { InitializeComponent(); this.xtraDictionaryEditMunitControl1.ParentMunitControl = parentMunitControl; this.xtraDictionaryEditMunitControl1.Municipality = munit; this.xtraDictionaryEditMunitControl1.ControlType = XtraBaseControl.Type.Form; }
private void FillData(municipality munit) { if (munit == null) { throw new ArgumentNullException("munit", "Несуществующий муниципалитет"); } this.textBoxPhone.Text = munit.phone; this.textBoxOperator.Text = munit.@operator; this.textBoxSelfManagementAgency.Text = munit.self_management_agency; this.textBoxManagementDirector.Text = munit.self_management_agency_director; this.textBoxManagementPhone.Text = munit.director_phone; }
public static Tile CreateMunitTile(municipality m, bool isArchive = false) { var mTile = CreateTile(TileItemSize.Medium, 3); mTile.Tag = TagHelper.GetTag(TagHelper.TagType.Tile, m, isArchive ? "archive" : ""); mTile.Elements[0].Appearance.Assign(AppearanceMid); mTile.Elements[0].Text = m.name; mTile.Elements[1].Appearance.Assign(AppearanceText); mTile.Elements[1].TextAlignment = TileItemContentAlignment.BottomLeft; mTile.Elements[1].Text = "Образовательных организаций"; mTile.Elements[2].Appearance.Assign(AppearanceText); mTile.Elements[2].TextAlignment = TileItemContentAlignment.BottomRight; mTile.Elements[2].Text = m.edus.Count.ToString(); return mTile; }
private void SaveData(municipality munit) { if (munit == null) { throw new ArgumentNullException("munit", "Несуществующий муниципалитет"); } munit.phone = this.textBoxPhone.Text; var operatorName = this.textBoxOperator.Text.Trim(); if (!String.IsNullOrEmpty(operatorName)) munit.@operator = operatorName; var selfManagement = this.textBoxSelfManagementAgency.Text; if (!String.IsNullOrEmpty(selfManagement)) munit.self_management_agency = selfManagement; var selfManagementDirector = this.textBoxManagementDirector.Text; if (!String.IsNullOrEmpty(selfManagementDirector)) munit.self_management_agency_director = selfManagementDirector; var selfManagementPhone = this.textBoxManagementPhone.Text; if (!String.IsNullOrEmpty(selfManagementPhone)) munit.director_phone = selfManagementPhone; }
async private Task InitializeMunicipality(Repository repo, form summaryForm, int year) { var munit = await repo.GetMunicipality(Authentication.Credentials.MunitId); _formula = await repo.GetFormulasBySummaryForm(summaryForm.form_id); this.IsAvailable = (_formula != null); if (this.IsAvailable) { _municipality = munit; _summaryForm = summaryForm; _regularForm = _formula.regular_form; _year = year; var eduList = await repo.GetEdus(munit.municipality_id); var eduHasFormIdList = (await repo.GetEdusHaveFormData(_regularForm.form_id, _year)) .Select(t => t.edu_id); foreach (var edu in eduList) { var hasForm = eduHasFormIdList.Contains(edu.edu_id); edu.SetAttachedProperty("bHasForm", hasForm); } this.eduBindingSource.DataSource = eduList; } }
public static String GetFormContainerTag(municipality m, form_type type, bool isArchive) { return String.Format("{2}container-munit-{0}-form_type-{1}", m.municipality_id, type.form_type_id, isArchive ? "archive" : ""); }
public QueryReportMunicipalityData(municipality munit, query query, object data) : base (query, data) { this.Municipality = munit; }
public static Tile CreateMunitTileForMunicipality(municipality m, bool isArchive = false) { var mTile = CreateTile(TileItemSize.Wide, 2); mTile.Tag = TagHelper.GetTag(TagHelper.TagType.Tile, m, isArchive ? "m-archive" : "m"); mTile.Elements[0].Appearance.Assign(AppearanceMid); mTile.Elements[0].Text = m.name; mTile.Elements[1].Appearance.Assign(AppearanceText); mTile.Elements[1].TextAlignment = TileItemContentAlignment.BottomLeft; return mTile; }