public frmSourceAddEdit(int EditSourceId, MaskingSource maskingSource, string subType) { AllowedFileExtensions = Enum.GetNames(typeof(FileExtn)).ToList().ConvertAll(d => d.ToUpper()); this.MaskingSource = maskingSource; this.EditSourceId = EditSourceId; this.SubType = subType; InitializeComponent(); FileExtensionTypeDictionary = GetFileExtensionTypeDictionary(); }
public frmConfigurationAddEdit(int parentSourceId, int EditConfigurationId, MaskingSource maskingSource, string FileExt) { this.MaskingSource = maskingSource; this.ParentSourceId = parentSourceId; this.ChildConfigurationId = EditConfigurationId; this.FileExtensionTargets = FileExt; InitializeComponent(); txtVersion.Enabled = FileExtn.TXT.ToString() == FileExt ? false : true; this.Height = 550; }
public DataMaskingConfigurator() { InitializeComponent(); MaskingConfigSourcePath = Convert.ToString(ConfigurationManager.AppSettings["ConfigurationSourcePath"]); MaskingSourceFileName = string.Format("{0}{1}{2}", MaskingConfigSourcePath, Path.DirectorySeparatorChar, "MaskingSource.xml"); MaskingSourceSchemaFileName = string.Format("{0}{1}{2}", MaskingConfigSourcePath, Path.DirectorySeparatorChar, "MaskingSourceSchema.xsd"); maskingSource = new MaskingSource(); dtSource = maskingSource.Tables["Source"]; dtConfiguration = maskingSource.Tables["Configuration"]; dtWorkflow = maskingSource.Tables["Workflow"]; dtProduct = maskingSource.Tables["Product"]; }
public frmGroups(MaskingSource maskingSource) { InitializeComponent(); this.MaskingSource = maskingSource; }
private void SetDefaultMaskingSourceSchema(MaskingSource maskingSource) { if (File.Exists(MaskingSourceFileName)) { File.Delete(MaskingSourceFileName); } try { // Workflow DataRow drWF = dtWorkflow.NewRow(); drWF["WorkflowId"] = "1"; drWF["WorkflowVal"] = "Default"; dtWorkflow.Rows.Add(drWF); // Product DataRow drPN = dtProduct.NewRow(); drPN["ProductId"] = "1"; drPN["ProductVal"] = "Default"; dtProduct.Rows.Add(drPN); } catch (Exception ex) { throw; } //Configuration - 1 for TXT -Rec Type = 0 DataRow drMS = dtSource.NewRow(); drMS["SourceId"] = "1"; drMS["ConfigurationName"] = "Print ImageSD Configuration "; drMS["RecordType"] = "N/A"; drMS["FileExtensionTargets"] = "TXT"; drMS["SubType"] = "GEFLEET"; drMS["FileExtnType"] = FileExtnType.PrintImageSD.ToString(); dtSource.Rows.Add(drMS); DataRow drMC = dtConfiguration.NewRow(); drMC["SourceId"] = "1"; drMC["ConfigurationId"] = "1"; drMC["SettingName"] = "AccountNo"; drMC["PageNumber"] = "2"; drMC["RowNo"] = "8"; drMC["StartPos"] = "119"; drMC["FieldLength"] = "10"; drMC["Workflow"] = "Default"; drMC["Product"] = "Default"; dtConfiguration.Rows.Add(drMC); drMC = dtConfiguration.NewRow(); drMC["SourceId"] = "1"; drMC["ConfigurationId"] = "2"; drMC["SettingName"] = "AddressLine1"; drMC["PageNumber"] = "1"; drMC["RowNo"] = "18"; drMC["StartPos"] = "14"; drMC["FieldLength"] = "30"; drMC["Workflow"] = "Default"; drMC["Product"] = "Default"; dtConfiguration.Rows.Add(drMC); drMC = dtConfiguration.NewRow(); drMC["SourceId"] = "1"; drMC["ConfigurationId"] = "3"; drMC["SettingName"] = "Address Lines"; drMC["PageNumber"] = "1"; drMC["RowNo"] = "20,22,24,26"; drMC["StartPos"] = "14"; drMC["FieldLength"] = "30"; drMC["Workflow"] = "Default"; drMC["Product"] = "Default"; dtConfiguration.Rows.Add(drMC); maskingSource.WriteXmlSchema(MaskingSourceSchemaFileName); maskingSource.WriteXml(MaskingSourceFileName); maskingSource.AcceptChanges(); maskingSource.Clear(); }