public NewMetaHeader(String MHDFPath, OPType opType) { InitializeComponent(); tcMetaInfo.TabPages.Remove(tpMISummary); this.MHDFPath = MHDFPath; if (opType == OPType.Modify) { //Deserialize XML file if (CoreData.CommonData.mdm != null) { mdm = CoreData.CommonData.mdm; } else { MetaXMLReader mxReader = new MetaXMLReader(); mdm = mxReader.readMetaHeaderFile(MHDFPath); } } else if (opType == OPType.New) { mdm = new MetaDataModel(); } }
//-----------------Insert public int Insert(string CartID, string DomName, OPType Type, string OwnUserID, string Detail) { SqlParameter[] sp = new SqlParameter[] { new SqlParameter("CartID", CartID), new SqlParameter("DomName", DomName), //用户更改插入此值 new SqlParameter("Type", Type), //管理员更改插入此值 new SqlParameter("OwnUserID", OwnUserID), new SqlParameter("Detail", Detail), }; return(SqlHelper.ExecuteNonQuery(CommandType.Text, "Insert Into " + strTableName + " (CartID,DomName,Type,OwnUserID,Detail)Values(@CartID,@DomName,@Type,@OwnUserID,@Detail);select @@IDENTITY;", sp)); }
/// <summary> /// /// </summary> /// <param name="fileName"></param> /// <param name="dsObject"></param> /// <param name="opType"></param> private void InputFile(string fileName, DataSet dsObject, OPType opType) { switch (opType) { case OPType.AccountList: { // break; } case OPType.Synchronous: { // break; } } dsObject.ReadXml(Server.MapPath(String.Empty) + @"\" + fileName, XmlReadMode.ReadSchema); }
/// <summary> /// /// </summary> /// <param name="fileName"></param> /// <param name="dsObject"></param> /// <param name="opType"></param> private void OutputFile(string fileName, DataSet dsObject, OPType opType) { switch (opType) { case OPType.AccountList: { // break; } case OPType.PaymentList: { // break; } } dsObject.WriteXml(Server.MapPath(String.Empty) + @"\" + fileName, XmlWriteMode.WriteSchema); }
public NewMetaHeader(String MHDFPath, OPType opType) { InitializeComponent(); tcMetaInfo.TabPages.Remove(tpMISummary); this.MHDFPath = MHDFPath; if (opType == OPType.Modify) { //Deserialize XML file if (CoreData.CommonData.mdm != null) mdm = CoreData.CommonData.mdm; else { MetaXMLReader mxReader = new MetaXMLReader(); mdm = mxReader.readMetaHeaderFile(MHDFPath); } } else if (opType == OPType.New) { mdm = new MetaDataModel(); } }
public DBForm(OPType opType, int?id = null) { InitializeComponent(); this.OpType = opType; if ((this.OpType == OPType.编辑 || this.OpType == OPType.克隆) && !id.HasValue) { throw new ArgumentNullException(this.OpType + "操作必须传递要操作的Id!"); } else { if (id.HasValue) { foreach (var item in FormUtils.DictDBType) { cboDBType.Items.Add(item.Value.ToString()); } this.Id = id.Value; DBCHMConfig config = ConfigUtils.Get(id.Value); TxtConnectName.Text = config.Name; cboDBType.Text = config.DBType; TxtHost.Text = config.Server; TxtPort.Text = config.Port?.ToString(); TxtUName.Text = config.Uid; TxtPwd.Text = config.Pwd; cboDBName.Text = config.DBName; txtConnTimeOut.Text = config.ConnTimeOut?.ToString(); if (this.OpType == OPType.克隆) { TxtConnectName.Text += "_Clone"; } if (config.DBType == DBType.SQLite.ToString()) { btnSelectFile.Visible = true; TxtHost.Enabled = false; TxtPort.Enabled = false; TxtUName.Enabled = false; //暂不支持 加密的 Sqlite数据库 TxtPwd.Enabled = false; } //编辑时,确定后刷新连接列表 BtnOk.DialogResult = DialogResult.OK; } else { btnSelectFile.Visible = false; } if (string.IsNullOrWhiteSpace(txtConnTimeOut.Text)) { txtConnTimeOut.Text = "60"; } } //为KeyDown能应用到所有控件上 注册 KeyDown 事件 foreach (Control control in this.Controls) { control.KeyDown += control_KeyDown; } lblMsg.Text = string.Empty; }
/// <summary> /// The map op list type. /// </summary> /// <param name="statement"> /// The statement. /// </param> /// <param name="recordNumber"> /// The record Number. /// </param> /// <returns> /// The <see cref="RECType"/> . /// </returns> protected virtual OPType MapOpListType(StatementBatch statement, int recordNumber) { // Загрузка старых данных если требуется var statementChangeDates = LoadOldStatementData(statement); var optype = new OPType(); optype.N_REC = recordNumber.ToString(CultureInfo.InvariantCulture); optype.ID = statement.Id; optype.ISACTIVE = (statement.Version == statement.VersionExport && statement.IsActive) ? "1" : "0"; optype.VERSION = statement.VersionExport.ToString(CultureInfo.InvariantCulture); optype.NEED_NEW_POLICY = statement.AbsentPrevPolicy.HasValue ? statement.AbsentPrevPolicy.Value : false; // Данные об обращении в СМО optype.VIZIT = GetVizit(statement); // Данные о застрахованном лице optype.PERSON = GetPerson(statement); // Документы optype.DOC_LIST = new List <DocType>(); optype.DOC_LIST.Add(GetDocument(statement.DocumentUdl, DocumentCategory.Udl)); if (statement.DocumentRegistration != null && statement.DocumentUdl.Id != statement.DocumentRegistration.Id) { optype.DOC_LIST.Add(GetDocument(statement.DocumentRegistration, DocumentCategory.Registration)); } if (statement.ResidencyDocument != null) { optype.DOC_LIST.Add(GetDocument(statement.ResidencyDocument, DocumentCategory.Residency)); } // Адрес регистрации optype.ADDRES_G = GetAddress(statement.Address, statement.Kladr); // Адрес проживания if (statement.Address2 != null && statement.Address.Id != statement.Address2.Id) { optype.ADDRES_P = GetAddress(statement.Address2, statement.Kladr2); } // Событие страхования optype.INSURANCE = GetInsurance(statement); // Медиа optype.PERSONB = GetPersonBList(statement); // Изменения по версиям optype.STATEMENT_CHANGE = statementChangeDates != null && statementChangeDates.Count > 0 ? statementChangeDates.Select( x => new StatementChange { VERSION = x.Version.ToString( CultureInfo .InvariantCulture), FIELD = x.Field.Code, DATA = x.Datum }).ToList() : null; return(optype); }