public AddOrUpdateForm(FormType formType)
 {
     InitializeComponent();
     setupComboBox();
     this.formType = formType;
     propertyController = new PropertyController();
 }
 /// <summary>
 /// Creates the new game.
 /// </summary>
 /// <param name="formType">Type of the form.</param>
 private void CreateNewGame(FormType formType)
 {
   FormForSelection selectorForm = new FormForSelection(formType);
   if(selectorForm.ShowDialog() != DialogResult.OK)
   {
     return;
   }
   _game = null;
   try
   {
     _game = Game.Factory(selectorForm.ReturnFileName(),
                          formType == FormType.GameConfiguration ? FactoryAct.Create : FactoryAct.Load,
                          _graphObject);
   }
   catch
   {
     _game = null;
   }
   if(_game == null)
   {
     return;
   }
   _game.Scaling = _currentScale;
   _gameMenu = null;
   _graphObject.ClearCache();
   MessageBox.Show(Resources.Game_created_successeful);
 }
        /// <summary>
        /// Creates new application for user in database and prefills it with necessary initial data.
        /// </summary>
        /// <param name="typeOfForm">The type of form to look for.</param>
        /// <param name="userId">The user Id</param>
        /// <returns>Unique ID of application</returns>
        public int CreateNewApplication(FormType typeOfForm, int userId)
        {
            // TODO: add parameters, actually create application structure, save it to DB, get its ID and return to caller.

            ApplicationForm applicationDbObject = null;

            switch (typeOfForm)
            {
                case FormType.Unknown:
                    break;
                case FormType.OPIStudyResidencePermit:
                    // ApplicationDbObject = this.databaseHelper.Get<ApplicationForm>(o => o.UserId == userId && o.FormCode == (short)FormType.OPIStudyResidencePermit);

                    if (applicationDbObject == null)
                    {
                        applicationDbObject = this.CreateApplicationForm(userId, typeOfForm);

                        this.databaseHelper.Create(applicationDbObject);
                        this.databaseHelper.FlushChanges();
                    }

                    break;
                default:
                    break;
            }

            return applicationDbObject.ApplicationFormId;
        }
 static public void openform(string frmChild, Form frmParent,RadDock raddock, FormType formType)
 {
     Form frm;
     Type CAType = Type.GetType("SMS_Management." + frmChild);
     frm = (Form)Activator.CreateInstance(CAType);
     switch (formType)
     {
         case FormType.Mdi:
             if (frmParent != null)
             {
                 for (int i = 0; i < raddock.DocumentManager.DocumentArray.Length; i++)
                 {
                     Form f = ((HostWindow)raddock.DocumentManager.DocumentArray[i]).MdiChild;
                     if (f.Name == frm.Name)
                     {
                         raddock.DocumentManager.DocumentArray[i].Select();
                         return;
                     }
                 }
                 frm.MdiParent = frmParent;
             }
             frm.Show();
             raddock.DocumentManager.DocumentArray[0].Select();
             break;
         case FormType.Dialog:
             frm.ShowDialog();
             break;
         case FormType.Form:
             frm.Show();
             break;
     }
 }
 private void CreateNewGame(FormType formType)
 {
   FormForSelection selectorForm = new FormForSelection(formType);
   if (selectorForm.ShowDialog() == DialogResult.OK)
   {
     if (_game != null)
     {
       if (_timer != null)
         _timer.Stop();
       _game = null;
     }
     try
     {
       _game = Game.Factory(selectorForm.ReturnFileName(),
                            formType == FormType.GameConfiguration ? FactoryAct.Create : FactoryAct.Load,
                            _graphObject);
     }
     catch
     {
       _game = null;
     }
     if (_game != null)
     {
       _game.Scaling = _currentScale;
       _gameMenu = null;
       MessageBox.Show("Game conf loaded successeful");
     }
     if (_timer != null)
       _timer.Start();
   }
 }
Example #6
0
 private void Init(HtmlHelper html, string actionName = null, string controllerName = null, object routeValues = null,
                   FormMethod method = FormMethod.Post, object htmlAttrs = null, FormType? formType = null)
 {
     var attrs = new HtmlAttributes(htmlAttrs);
     if (formType != null) attrs["class"] += "form-" + formType.ToString().ToLower();
     if (html == null) return;
     _form = html.BeginForm(actionName, controllerName, new RouteValueDictionary(routeValues), method, attrs.ToDictionary());
 }
Example #7
0
 /// <summary>
 /// 取得Schema的模板相对路径
 /// </summary>
 /// <param name="schema">The schema.</param>
 /// <param name="formType">Type of the form.</param>
 /// <returns></returns>
 public static string GetFormTemplate(this Schema schema, FormType formType)
 {        
     var virtualPath = GetCustomTemplateFileVirtualPath(schema, formType);
     if (string.IsNullOrEmpty(virtualPath))
     {
         virtualPath = GetFormFileVirtualPath(schema, formType);
     }
     return virtualPath;
 }
Example #8
0
        /// <summary>
        /// 查找内容目录下是否有自定义的内容模板,如果有,则优先使用该模板。
        /// </summary>
        /// <param name="folder">The folder.</param>
        /// <param name="formType">Type of the form.</param>
        /// <returns></returns>
        public static string GetFormTemplate(this TextFolder folder, FormType formType)
        {
            var folderTemplate = GetFolderFormTemplate(folder, formType);

            if (string.IsNullOrEmpty(folderTemplate))
            {
                folderTemplate = GetSchema(folder).GetFormTemplate(formType);
            }
            return folderTemplate;
        }
Example #9
0
 private static string GetCustomTemplateFileVirtualPath(Schema schema, FormType type)
 {
     var schemaPath = new SchemaPath(schema);
     string fileVirtualPath = "";
     var filePhysicalPath = GetCustomTemplatePhysicalPath(schema, type);
     if (System.IO.File.Exists(filePhysicalPath))
     {
         fileVirtualPath = UrlUtility.Combine(schemaPath.VirtualPath, CUSTOM_TEMPLATES, string.Format("{0}.cshtml", type));
     }
     return fileVirtualPath;
 }
Example #10
0
 private static string GetFormFileVirtualPath(Schema schema, FormType type)
 {
     var razorTemplate = GetFormFilePhysicalPath(schema, type);
     var schemaPath = new SchemaPath(schema);
     var templateVirtualPath = UrlUtility.Combine(schemaPath.VirtualPath, string.Format("{0}.ascx", type));
     if (System.IO.File.Exists(razorTemplate))
     {
         templateVirtualPath = UrlUtility.Combine(schemaPath.VirtualPath, string.Format("{0}.cshtml", type));
     }
     return templateVirtualPath;
 }
Example #11
0
 /// <summary>
 /// Gets the folder form template.
 /// </summary>
 /// <param name="textFolder">The text folder.</param>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 private static string GetFolderFormTemplate(TextFolder textFolder, FormType type)
 {
     string fileVirtualPath = "";
     var folderPath = new FolderPath(textFolder);
     string filePhysicalPath = Path.Combine(folderPath.PhysicalPath, SchemaExtensions.CUSTOM_TEMPLATES, string.Format("{0}.cshtml", type));
     if (File.Exists(filePhysicalPath))
     {
         fileVirtualPath = UrlUtility.Combine(folderPath.VirtualPath, SchemaExtensions.CUSTOM_TEMPLATES, string.Format("{0}.cshtml", type));
     }
     return fileVirtualPath;
 }
Example #12
0
        public void ShowForm(FormType formType)
        {
            if (_currentForm != null)
                _currentForm.Hide();

            _currentFormType = formType;
            _currentForm = _formList[formType];
            _currentForm.FormClosed += _currentForm_FormClosed;

            _currentForm.Show();
        }
        internal void PopulatePageFromXml(string associationXml, FormType type)
        {
            Workflow1Data workflow1Data = new Workflow1Data();
            if (!string.IsNullOrEmpty(associationXml))
            {
                XmlSerializer serializer = new XmlSerializer(typeof(Workflow1Data));
                XmlTextReader reader = new XmlTextReader(new System.IO.StringReader(associationXml));
                workflow1Data = (Workflow1Data)serializer.Deserialize(reader);
            }

                checkBox1.Checked = workflow1Data.FinanceManager;
                checkBox2.Checked = workflow1Data.TechnologyManager;
                checkBox3.Checked = workflow1Data.Superviser;
        }
Example #14
0
 public AddProductRowForm(FormType ftype, string tag)
 {
     InitializeComponent();
     switch (ftype)
     {
         case FormType.ADDFORM:
             this.Text = "Добавление записи в таблицу";
             break;
         case FormType.EDITFORM:
             this.Text = "Редактирование записи";
             break;
     }
     TableTag = tag;
     FType = ftype;
 }
Example #15
0
 public AddCompositionRowForm(FormType ftype)
 {
     InitializeComponent();
     switch (ftype)
     {
         case FormType.ADDFORM:
             this.Text = "Добавление записи в таблицу";
             break;
         case FormType.EDITFORM:
             this.Text = "Редактирование записи";
             break;
     }
     InitializeData();
     FType = ftype;
 }
Example #16
0
 public AddPlanProductsRowForm(FormType ftype, PlanProductsRow data)
 {
     InitializeComponent();
     switch (ftype)
     {
         case FormType.ADDFORM:
             this.Text = "Добавление записи в таблицу";
             break;
         case FormType.EDITFORM:
             this.Text = "Редактирование записи";
             break;
     }
     FType = ftype;
     InitializeData();
     LoadDataToControls(data);
 }
        public frmInput(FormType formType, FormMode formMode)
        {
            InitializeComponent();

            this.formType = formType;
            this.formMode = formMode;

            label1.Visible = textBox1.Visible = true;
            label2.Visible = textBox2.Visible = (formType != FormType.mdAspect);
            label3.Visible = textBox3.Visible = (formType != FormType.mdAspect);

            if (formMode == FormMode.mdInsert)
                textBox1.Text = textBox2.Text = textBox3.Text = "";
            else
            {
                textBox1.Text = text1;
                textBox2.Text = text2;
                textBox3.Text = text3;
            }

            switch (formType)
            {
                case FormType.mdAspect:
                    this.Text = (formMode == FormMode.mdInsert ? "New Aspect" : "Edit Aspect");
                    label1.Text = "Name:";
                    this.MaximumSize = this.Size = this.MinimumSize = new Size(346, 140);
                    break;
                case FormType.mdAdvice:
                    this.Text = (formMode == FormMode.mdInsert ? "New Advice" : "Edit Advice");
                    label1.Text = "Name:";
                    label2.Text = "Process:";
                    label3.Text = "Goal:";
                    this.MaximumSize = this.Size = this.MinimumSize = new Size(346, 185);
                    break;
                case FormType.mdPointcut:
                    this.Text = (formMode == FormMode.mdInsert ? "New Pointcut" : "Edit Pointcut");
                    label1.Text = "Process:";
                    label2.Text = "Task:";
                    label3.Text = "Condition:";
                    this.MaximumSize = this.Size = this.MinimumSize = new Size(346, 185);
                    break;
                default:
                    break;
            }

        }
Example #18
0
 public AddProductRowForm(FormType ftype, string tag, ProductRow data, long key)
 {
     InitializeComponent();
     switch (ftype)
     {
         case FormType.ADDFORM:
             this.Text = "Добавление записи в таблицу";
             break;
         case FormType.EDITFORM:
             this.Text = "Редактирование записи";
             break;
     }
     TableTag = tag;
     FType = ftype;
     Key = key;
     LoadDataToControls(data);
 }
Example #19
0
        /// <summary>
        /// 查找内容目录下是否有自定义的内容模板,如果有,则优先使用该模板。
        /// </summary>
        /// <param name="folder">The folder.</param>
        /// <param name="formType">Type of the form.</param>
        /// <returns></returns>
        public static string GetFormTemplate(this TextFolder folder, FormType formType)
        {
            var folderTemplate = GetFolderFormTemplate(folder, formType);

            if (string.IsNullOrEmpty(folderTemplate))
            {
                folderTemplate = GetSchema(folder).GetFormTemplate(formType);
            }
            if (!string.IsNullOrEmpty(folderTemplate))
            {
                var physical = UrlUtility.MapPath(folderTemplate);
                if (!File.Exists(physical))
                {
                    folderTemplate = null;
                }
            }
            return folderTemplate;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="FormForSelection"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 public FormForSelection(FormType type)
 {
   InitializeComponent();
   _type = type;
   switch (type)
   {
     case FormType.GameConfiguration:
       Text = "Game configuration selection";
       BSelect.Text = "Select";
       break;
     case FormType.Load:
       Text = "Load the game";
       BSelect.Text = "Load";
       break;
     default:
       throw new ArgumentOutOfRangeException("type");
   }
 }
        internal string SerializePagetoXml(FormType type)
        {
            Workflow1Data data = new Workflow1Data();
            /* ikarstein: Start your modifications here */

                data.FinanceManager = checkBox1.Checked;
                data.TechnologyManager = checkBox1.Checked;
                data.Superviser = checkBox3.Checked;

            using (MemoryStream stream = new MemoryStream())
            {
                XmlSerializer serializer = new XmlSerializer(typeof(Workflow1Data));
                serializer.Serialize(stream, data);
                stream.Position = 0;
                byte[] bytes = new byte[stream.Length];
                stream.Read(bytes, 0, bytes.Length);
                return Encoding.UTF8.GetString(bytes);
            }
        }
Example #22
0
        private void BindDDL(FormType current)
        {
            List<FormType> mys = ResolveDDL<FormType>(FormTypeHelper.FormTypes, current.ID);

            // 绑定到下拉列表(启用模拟树功能和不可选择项功能)
            ddlParent.EnableSimulateTree = true;
            ddlParent.DataTextField = "Name";
            ddlParent.DataValueField = "ID";
            ddlParent.DataSimulateTreeLevelField = "TreeLevel";
            ddlParent.DataEnableSelectField = "Enabled";
            ddlParent.DataSource = mys;
            ddlParent.DataBind();

            if (current.Parent != null)
            {
                // 选中当前节点的父节点
                ddlParent.SelectedValue = current.Parent.ID.ToString();
            }
        }
Example #23
0
        private void SaveItem()
        {
            FormType item = new FormType();
            item.Name = tbxName.Text.Trim();
            item.SortIndex = Convert.ToInt32(tbxSortIndex.Text.Trim());

            int parentID = Convert.ToInt32(ddlParent.SelectedValue);
            if (parentID == -1)
            {
                item.Parent = null;
            }
            else
            {
                FormType formtype= Attach<FormType>(parentID);
                item.Parent = formtype;
            }

            DB.FormTypes.Add(item);
            DB.SaveChanges();
        }
Example #24
0
 public FindReplaceForm(FormType formType)
 {
     InitializeComponent();
     this.formType = formType;
     this.ActiveControl = this.tbTextToFind;
     if (formType == FormType.Find)
     {
         this.AcceptButton = this.btFindNext;
         this.tbTextToReplace.Visible = false;
         this.lReplaceTo.Visible = false;
         this.btReplace.Visible = false;
         this.btReplaceAll.Visible = false;
     }
     else
     {
         this.AcceptButton = this.btReplace;
         AddOwnedForm(ReplaceConfirmDlg = new ReplaceConfirmDialog());
         PascalABCCompiler.StringResources.SetTextForAllObjects(ReplaceConfirmDlg, "VP_REPLACECONFIRMDLGFORM_");
     }
 }
Example #25
0
 public FormData GetFormData(int dataid,FormType formtype)
 {
     string cmdText = string.Format("select {0} from FormData where dataid=@dataid and formtype=@formtype",FORMDATA_FIELDS);
     SqlParameter[] parameters =
     {
         SqlParamHelper.MakeInParam("@dataid",SqlDbType.Int,4,dataid),
         SqlParamHelper.MakeInParam("@formtype",SqlDbType.SmallInt,2,formtype.ToInt32())
     };
     using (IDataReader dr = SqlHelper.ExecuteReader(WriteConnectionString,CommandType.Text,cmdText,parameters)){
         if(dr.Read()){
             return new FormData
             {
                 autoid = dr["id"].ToInt32(),
                 dataid = dr["dataid"].ToInt32(),
                 formtype = dr["formtype"].ToString().ToEnum(FormType.GJLXXNCSBG),
                 formdata = dr["formdata"].ToString(),
                 createtime = Convert.ToDateTime(dr["createtime"])
             };
         }
     }
     return null;
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="type"></param>
        public void SetControl(FormType type)
        {
            if (StackPanel != null && !Dispatcher.CheckAccess())
            {
                ChangeControl d = SetControl;
                Dispatcher.Invoke(d, type);
            }
            else
            {
                switch (type)
                {
                    case FormType.Conversation:
                        MainGrid.Children.Remove(StackPanel);
                        StackPanel = new Conversation();
                        Info.Text = string.Format("{0}: {1}", ChatHelper.CONVERSATION, caller);
                        break;
                    case FormType.Incoming:
                        StackPanel = new IncomingCall();
                        Info.Text = string.Format("{0}: {1}", ChatHelper.INCOMING_CALL, caller);
                        break;
                    case FormType.Outcoming:
                        StackPanel = new OutcomingCall();
                        Info.Text = string.Format("{0}: {1}", ChatHelper.OUTCOMING_CALL, caller);
                        break;
                    case FormType.File:
                        StackPanel = new RecieveFile();
                        Info.Text = string.Format(ChatHelper.FILE_TRANSFER, caller);
                        break;
                }

                if (StackPanel == null)
                    return;

                SubscribePanel();
                SetControl();
            }
        }
Example #27
0
 public CreateTeamForm(FormType type)
     : this()
 {
     _formType   = type;
     label2.Text = _formType == FormType.CreateTeam ? "群名称:" : "附言:";
 }
 /// <summary>
 /// Goes to database to check whether user already have application draft based on parameters - type and user id
 /// </summary>
 /// <param name="typeOfForm">The type of form to look for.</param>
 /// <returns>Id of existing Draft or NULL if application is not found</returns>
 public int? GetExistingApplicationId(FormType typeOfForm)
 {
     // TODO: probably needs parameters of application type and maybe user id and maybe something else...
     return null;
 }
Example #29
0
 public EditKernelOutputTranslaterCommand(FormType formType, KernelOutputTranslaterViewModel source) : base(formType, source)
 {
 }
Example #30
0
 /// <summary>
 /// Sets the Display form type
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public Form Type(FormType type)
 {
     this._formType = type;
     return this;
 }
Example #31
0
 public EditFileWriterCommand(FormType formType, FileWriterViewModel source) : base(formType, source)
 {
 }
Example #32
0
 public static Form Type(this Form form, FormType type)
 {
     form._formType = type;
     return(form);
 }
Example #33
0
        private void ShowNewChildForm(FormType childForm)
        {
            String       frmAction = GetFormAction(childForm);
            DBactionType dbAction  = GetDbAction(childForm);

            switch (childForm)
            {
            case FormType.CUSTOMER_NEW:
                frmCustomer frmCustNew = new frmCustomer();
                ShowMDIChild(frmCustNew, frmAction, dbAction);
                break;

            case FormType.CUSTOMER_EDIT:
                frmCustomer frmCustEdit = new frmCustomer();
                ShowMDIChild(frmCustEdit, frmAction, dbAction);
                break;

            case FormType.CUSTOMER_DELETE:
                frmCustomer frmCustDelete = new frmCustomer();
                ShowMDIChild(frmCustDelete, frmAction, dbAction);
                break;

            case FormType.CUSTOMER_SEARCH:
                frmCustomer frmCustSearch = new frmCustomer();
                ShowMDIChild(frmCustSearch, frmAction, dbAction);
                break;

            case FormType.EMPLOYEE_NEW:
                frmCustomer frmEmplNew = new frmCustomer();
                ShowMDIChild(frmEmplNew, frmAction, dbAction);
                break;

            case FormType.EMPLOYEE_EDIT:
                frmCustomer frmEmplEdit = new frmCustomer();
                ShowMDIChild(frmEmplEdit, frmAction, dbAction);
                break;

            case FormType.EMPLOYEE_DELETE:
                frmCustomer frmEmplDelete = new frmCustomer();
                ShowMDIChild(frmEmplDelete, frmAction, dbAction);
                break;

            case FormType.EMPLOYEE_SEARCH:
                frmCustomer frmEmplSearch = new frmCustomer();
                ShowMDIChild(frmEmplSearch, frmAction, dbAction);
                break;

            case FormType.LEADS_NEW:
                frmLeads frmLeadsNew = new frmLeads();
                ShowMDIChild(frmLeadsNew, frmAction, dbAction);
                break;

            case FormType.LEADS_EDIT:
                frmLeads frmLeadsEdit = new frmLeads();
                ShowMDIChild(frmLeadsEdit, frmAction, dbAction);
                break;

            case FormType.LEADS_DELETE:
                frmLeads frmLeadsDelete = new frmLeads();
                ShowMDIChild(frmLeadsDelete, frmAction, dbAction);
                break;

            case FormType.LEADS_SEARCH:
                frmLeads frmLeadsSearch = new frmLeads();
                ShowMDIChild(frmLeadsSearch, frmAction, dbAction);
                break;

            case FormType.INVENTORY_NEW:
                frmInventory frmInvNew = new frmInventory();
                ShowMDIChild(frmInvNew, frmAction, dbAction);
                break;

            case FormType.INVENTORY_EDIT:
                frmInventory frmInvEdit = new frmInventory();
                ShowMDIChild(frmInvEdit, frmAction, dbAction);
                break;

            case FormType.INVENTORY_DELETE:
                frmInventory frmInvDelete = new frmInventory();
                ShowMDIChild(frmInvDelete, frmAction, dbAction);
                break;

            case FormType.INVENTORY_SEARCH:
                frmInventory frmInvSearch = new frmInventory();
                ShowMDIChild(frmInvSearch, frmAction, dbAction);
                break;

            case FormType.MAINTENANCE_NEW:
                frmMaintenanceOrders frmMaintNew = new frmMaintenanceOrders();
                ShowMDIChild(frmMaintNew, frmAction, dbAction);
                break;

            case FormType.MAINTENANCE_EDIT:
                frmMaintenanceOrders frmMaintEdit = new frmMaintenanceOrders();
                ShowMDIChild(frmMaintEdit, frmAction, dbAction);
                break;

            case FormType.MAINTENANCE_DELETE:
                frmMaintenanceOrders frmMaintDelete = new frmMaintenanceOrders();
                ShowMDIChild(frmMaintDelete, frmAction, dbAction);
                break;

            case FormType.MAINTENANCE_SEARCH:
                frmMaintenanceOrders frmMaintSearch = new frmMaintenanceOrders();
                ShowMDIChild(frmMaintSearch, frmAction, dbAction);
                break;

            case FormType.PURCHASES_NEW:
                frmPurchasing frmNewPurchases = new frmPurchasing();
                ShowMDIChild(frmNewPurchases, frmAction, dbAction);
                break;

            case FormType.PURCHASES_EDIT:
                frmPurchasing frmEditPurchases = new frmPurchasing();
                ShowMDIChild(frmEditPurchases, frmAction, dbAction);
                break;

            case FormType.PURCHASES_DELETE:
                frmPurchasing frmDeletePurchases = new frmPurchasing();
                ShowMDIChild(frmDeletePurchases, frmAction, dbAction);
                break;

            case FormType.PURCHASES_SEARCH:
                frmPurchasing frmSearchPurchases = new frmPurchasing();
                ShowMDIChild(frmSearchPurchases, frmAction, dbAction);
                break;

            default:
                break;
            }
        }
        protected void BindFormData()
        {
            States = AgencyLogic.GetStates();

            DefaultState = ViewData.State;
            DropDownList ctrlState = (DropDownList)formViewSubStateRegionForReport.FindControl("dropDownListState");
            var          state     = ctrlState.Items.FindByValue(DefaultState.StateAbbr);

            if (state != null)
            {
                state.Selected = true;
            }


            ReportFromeType = Logic.GetFromeType();

            DropDownList ctrlForm = (DropDownList)formViewSubStateRegionForReport.FindControl("dropDownListFormType");

            ctrlForm.DataSource = ReportFromeType;
            ctrlForm.DataBind();
            ctrlForm.Items.Insert(0, "-- Select Form Type --");

            var reportType = ctrlForm.Items.FindByValue(((int)ViewData.ReprotFormType).ToString());

            if (reportType != null)
            {
                reportType.Selected = true;
            }


            FormType _formType = (FormType)ViewData.ReprotFormType;

            ReportSubStateReportType = Logic.GetSubStateReportType(_formType);


            DropDownList ctrlGroup = (DropDownList)formViewSubStateRegionForReport.FindControl("dropDownListGroupype");

            ctrlGroup.DataSource = ReportSubStateReportType;
            ctrlGroup.DataBind();
            ctrlGroup.Items.Insert(0, "-- Select Report Group Type --");

            var groupType = ctrlGroup.Items.FindByValue(((int)ViewData.Type).ToString());

            if (groupType != null)
            {
                groupType.Selected = true;
            }



            SubStateReportType _type = (SubStateReportType)ViewData.Type;

            GetSelectionArea(_formType, _type);


            ListBox ctrlCounties = (ListBox)formViewSubStateRegionForReport.FindControl("listBoxCounties");
            ListBox ctrlSvc      = (ListBox)formViewSubStateRegionForReport.FindControl("listBoxServiceAreas");

            ctrlCounties.DataSource = DynamicSubStateRegions;
            ctrlSvc.DataSource      = DynamicSubStateRegions;
            ctrlCounties.DataBind();
            ctrlSvc.DataBind();
        }
Example #35
0
 public EditKernelOutputKeywordCommand(FormType formType, KernelOutputKeywordViewModel source) : base(formType, source)
 {
 }
Example #36
0
 public EditWalletCommand(FormType formType, WalletViewModel source) : base(formType, source)
 {
 }
Example #37
0
 public EditKernelCommand(FormType formType, KernelViewModel source) : base(formType, source)
 {
 }
Example #38
0
 public EditCoinCommand(FormType formType, CoinViewModel source) : base(formType, source)
 {
 }
Example #39
0
 public EditGroupCommand(FormType formType, GroupViewModel source) : base(formType, source)
 {
 }
Example #40
0
 /// <summary>
 /// set form type for this control : add/edit
 /// </summary>
 /// <param name="type">FormType, add / edit</param>
 public void SetFormType(FormType type)
 {
     m_formType = type;
 }
Example #41
0
 public EditPoolCommand(FormType formType, PoolViewModel source) : base(formType, source)
 {
 }
Example #42
0
 /// <summary>
 /// Get the xml file from the database of a specific type and load into a Form object
 /// </summary>
 /// <param name="businessApplicationId">Busines application id</param>
 /// <param name="formType">Form type</param>
 /// <param name="isClient">Flag to filter the client's reports</param>
 /// <returns>The Form definition for a specific type</returns>
 public static Form GetFormDefinition(Guid businessApplicationId, FormType formType, bool isClient)
 {
     Form formReturn = null;
     FormDefinition formDefinitionProcess = null;
     using (VestalisEntities ctx = new VestalisEntities())
     {
         //Form type code
         string formTypeText = formType.ToString();
         if (isClient)
         {
             //Execute search in the database to get the form definition according a type
             formDefinitionProcess = (from formDefinition in ctx.FormDefinitions
                                      where formDefinition.BusinessApplicationId == businessApplicationId
                                            && formDefinition.CatalogueValue.CatalogueValueData == formTypeText
                                            && formDefinition.IsClientVisible == isClient
                                      select formDefinition).FirstOrDefault();
         }
         else
         {
             //Execute search in the database to get the form definition according a type
             formDefinitionProcess = (from formDefinition in ctx.FormDefinitions
                                      where formDefinition.BusinessApplicationId == businessApplicationId
                                            && formDefinition.CatalogueValue.CatalogueValueData == formTypeText
                                      select formDefinition).FirstOrDefault();
         }
         if (formDefinitionProcess != null)
         {
             //Convert to a Form object
             formReturn = XmlHelper.ReadFormFromXml<Form>(formDefinitionProcess.XmlFormDefinition);
         }
         return formReturn;
     }
 }
Example #43
0
 public EditPackageCommand(FormType formType, PackageViewModel source) : base(formType, source)
 {
 }
Example #44
0
 public EditSysDicCommand(FormType formType, SysDicViewModel source) : base(formType, source)
 {
 }
Example #45
0
 public EditFragmentWriterCommand(FormType formType, FragmentWriterViewModel source) : base(formType, source)
 {
 }
Example #46
0
 public EditCommand(FormType formType, T source)
 {
     this.FormType = formType;
     this.Source   = source;
 }
Example #47
0
 public EditServerMessageCommand(FormType formType, ServerMessageViewModel source) : base(formType, source)
 {
 }
        private void AssociateQueryWithQuestion(Query query, int patientNumber, VisitType visitType, FormType formType,
		                                        Func<int, Question> questionFinder)
        {
            var patient = Patients.First(p => p.PatientNumber == patientNumber);
            var visit = patient.Visits.First(v => v.VisitType == visitType);
            var form = visit.Forms.First(f => f.FormType == formType);
            query.Question = questionFinder(form.Id);
        }
Example #49
0
        private String GetFormAction(FormType childForm)
        {
            switch (childForm)
            {
            case FormType.CUSTOMER_NEW:
                return("Add New Customers");

            case FormType.CUSTOMER_EDIT:
                return("Edit Customers");

            case FormType.CUSTOMER_DELETE:
                return("Delete Customers");

            case FormType.CUSTOMER_SEARCH:
                return("Search Customers");

            case FormType.EMPLOYEE_NEW:
                return("Add New Employees");

            case FormType.EMPLOYEE_EDIT:
                return("Edit Employees");

            case FormType.EMPLOYEE_DELETE:
                return("Delete Employees");

            case FormType.EMPLOYEE_SEARCH:
                return("Seach Employees");

            case FormType.LEADS_NEW:
                return("Add New Leads");

            case FormType.LEADS_EDIT:
                return("Edit Leads");

            case FormType.LEADS_DELETE:
                return("Delete Leads");

            case FormType.LEADS_SEARCH:
                return("Search Leads");

            case FormType.INVENTORY_NEW:
                return("Add New Inventory");

            case FormType.INVENTORY_EDIT:
                return("Edit Inventory");

            case FormType.INVENTORY_DELETE:
                return("Delete Inventory");

            case FormType.INVENTORY_SEARCH:
                return("Search Inventory");

            case FormType.MAINTENANCE_NEW:
                return("Add New Maintenance Orders");

            case FormType.MAINTENANCE_EDIT:
                return("Edit Maintenance Orders");

            case FormType.MAINTENANCE_DELETE:
                return("Delete Maintenance Orders");

            case FormType.MAINTENANCE_SEARCH:
                return("Search Maintenance Orders");

            case FormType.PURCHASES_NEW:
                return("Add New Purchases");

            case FormType.PURCHASES_EDIT:
                return("Edit Purchases");

            case FormType.PURCHASES_DELETE:
                return("Delete Purchases");

            case FormType.PURCHASES_SEARCH:
                return("Search Purchases");

            default:
                return("----");
            }
        }