当前位置: 首页>>代码示例>>C#>>正文


C# SIOTSDB_HHZXDataContext类代码示例

本文整理汇总了C#中SIOTSDB_HHZXDataContext的典型用法代码示例。如果您正苦于以下问题:C# SIOTSDB_HHZXDataContext类的具体用法?C# SIOTSDB_HHZXDataContext怎么用?C# SIOTSDB_HHZXDataContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SIOTSDB_HHZXDataContext类属于命名空间,在下文中一共展示了SIOTSDB_HHZXDataContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DeleteRecord

        public bool DeleteRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_FunctionMaster_fum_Info info = null;
            try
            {
                info = KeyObject as Sys_FunctionMaster_fum_Info;
                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    Sys_FunctionMaster_fum fum = db.Sys_FunctionMaster_fum.Single<Sys_FunctionMaster_fum>(i => i.fum_iRecordID == info.fum_iRecordID);

                    //for (int i = 0; i < fum.Sys_FormPurview_frps.Count; i++)
                    //{
                    //    Sys_FormPurview_frp sta = fum.Sys_FormPurview_frps[i];
                    //    db.Sys_FormPurview_frps.DeleteOnSubmit(sta);
                    //}

                    db.Sys_FunctionMaster_fum.DeleteOnSubmit(fum);
                    db.SubmitChanges();
                    return true;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:26,代码来源:SysFunctionMasterDA.cs

示例2: DisplayRecord

        public Model.SysMaster.Sys_UserMaster_usm_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_UserMaster_usm_Info usm = new Sys_UserMaster_usm_Info();
            Sys_UserMaster_usm_Info info = new Sys_UserMaster_usm_Info();
            usm = KeyObject as Sys_UserMaster_usm_Info;
            try
            {

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IQueryable<Sys_UserMaster_usm> taQuery =
                        (from ta in db.Sys_UserMaster_usm
                         where ta.usm_iRecordID == usm.usm_iRecordID
                         select ta).Take(1);

                    if (taQuery != null)
                    {
                        foreach (Sys_UserMaster_usm t in taQuery)
                        {
                            info = Common.General.CopyObjectValue<Sys_UserMaster_usm, Sys_UserMaster_usm_Info>(t);
                            FindUserRole(info);
                        }
                    }
                    return info;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:31,代码来源:SysUserMasterDA.cs

示例3: AllRecords

        public List<UserCardPair_ucp_Info> AllRecords()
        {
            List<UserCardPair_ucp_Info> listPairInfo = null;
            try
            {
                StringBuilder sbSQL = new StringBuilder();
                sbSQL.AppendLine("SELECT ");
                sbSQL.AppendLine("* FROM UserCardPair_ucp WHERE 1 = 1");
                sbSQL.AppendLine("AND ucp_lIsActive = 1");

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IEnumerable<UserCardPair_ucp_Info> query = db.ExecuteQuery<UserCardPair_ucp_Info>(sbSQL.ToString(), new object[] { });
                    if (query != null)
                    {
                        listPairInfo = query.ToList<UserCardPair_ucp_Info>();
                    }
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return listPairInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:26,代码来源:UserCardPairDA.cs

示例4: AllRecords

        public List<MealBookingHistory_mbh_Info> AllRecords()
        {
            List<MealBookingHistory_mbh_Info> listPairInfo = null;
            try
            {
                StringBuilder sbSQL = new StringBuilder();
                sbSQL.AppendLine("SELECT ");
                sbSQL.AppendLine("* FROM MealBookingHistory_mbh WHERE 1 = 1");

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IEnumerable<MealBookingHistory_mbh_Info> query = db.ExecuteQuery<MealBookingHistory_mbh_Info>(sbSQL.ToString(), new object[] { });
                    if (query != null)
                    {
                        listPairInfo = query.ToList<MealBookingHistory_mbh_Info>();
                    }
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return listPairInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:25,代码来源:MealBookingHistoryDA.cs

示例5: DeleteRecord

        public bool DeleteRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_RoleMaster_rlm_Info info = null;
            try
            {
                info = KeyObject as Sys_RoleMaster_rlm_Info;
                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    Sys_RoleMaster_rlm rlm = db.Sys_RoleMaster_rlm.Single<Sys_RoleMaster_rlm>(i => i.rlm_iRecordID == info.rlm_iRecordID);

                    for (int i = 0; i < rlm.Sys_UserRoles_usr.Count; i++)
                    {
                        Sys_UserRoles_usr sta = rlm.Sys_UserRoles_usr[i];
                        db.Sys_UserRoles_usr.DeleteOnSubmit(sta);
                    }

                    db.Sys_RoleMaster_rlm.DeleteOnSubmit(rlm);
                    db.SubmitChanges();
                    return true;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:26,代码来源:SysRoleMasterDA.cs

示例6: DisplayRecord

        public Sys_FormMaster_fom_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_FormMaster_fom_Info frm = new Sys_FormMaster_fom_Info();
            Sys_FormMaster_fom_Info info = null;
            frm = KeyObject as Sys_FormMaster_fom_Info;
            try
            {

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IQueryable<Sys_FormMaster_fom> taQuery =
                        (from ta in db.Sys_FormMaster_fom
                         where ta.fom_iRecordID == frm.fom_iRecordID
                         select ta).Take(1);

                    if (taQuery != null)
                    {
                        foreach (Sys_FormMaster_fom t in taQuery)
                        {
                            info = Common.General.CopyObjectValue<Sys_FormMaster_fom, Sys_FormMaster_fom_Info>(t);
                            FindFormPurview(info);
                        }
                    }
                    return info;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:31,代码来源:SysFormMasterDA.cs

示例7: DisplayRecord

        public PaymentUDMealState_pms_Info DisplayRecord(IModelObject KeyObject)
        {
            PaymentUDMealState_pms_Info displayInfo = KeyObject as PaymentUDMealState_pms_Info;

            if (displayInfo != null)
            {
                try
                {
                    using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                    {
                        PaymentUDMealState_pms displayData = db.PaymentUDMealState_pms.FirstOrDefault(t => t.pms_cRecordID == displayInfo.pms_cRecordID);

                        if (displayData != null)
                        {
                            displayInfo = Common.General.CopyObjectValue<PaymentUDMealState_pms, PaymentUDMealState_pms_Info>(displayData);
                        }
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }

            return displayInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:27,代码来源:PaymentUDMealStateDA.cs

示例8: DeleteRecord

        public ReturnValueInfo DeleteRecord(IModelObject KeyObject)
        {
            ReturnValueInfo returnInfo = new ReturnValueInfo(false);

            PaymentUDMealState_pms_Info deleteInfo = KeyObject as PaymentUDMealState_pms_Info;

            if (deleteInfo != null)
            {
                try
                {
                    using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                    {
                        PaymentUDMealState_pms deleteData = db.PaymentUDMealState_pms.FirstOrDefault(t => t.pms_cRecordID == deleteInfo.pms_cRecordID);

                        if (deleteData != null)
                        {
                            db.PaymentUDMealState_pms.DeleteOnSubmit(deleteData);

                            db.SubmitChanges();

                            returnInfo.boolValue = true;
                        }
                    }
                }
                catch (Exception Ex)
                {

                    returnInfo.messageText = Ex.Message;
                }
            }

            return returnInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:33,代码来源:PaymentUDMealStateDA.cs

示例9: SearchRecords

        public List<Sys_UserMaster_usm_Info> SearchRecords(Sys_UserMaster_usm_Info infoObj)
        {
            List<Sys_UserMaster_usm_Info> listReturn = null;

            try
            {
                string strSql = "select * from dbo.Sys_UserMaster_usm where 1=1 ";

                if(infoObj != null)
                {
                    if (!String.IsNullOrEmpty(infoObj.usm_cUserLoginID))
                    {
                        strSql += " and usm_cUserLoginID like %'" + infoObj.usm_cUserLoginID + "'% ";
                    }
                }

                IEnumerable<Sys_UserMaster_usm_Info> infos = null;

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    infos = db.ExecuteQuery<Sys_UserMaster_usm_Info>(strSql, new object[] { });
                    if (infos != null)
                    {
                        listReturn = infos.ToList();
                    }
                }
            }
            catch
            {
                throw;
            }

            return listReturn;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:34,代码来源:UserMasterDA.cs

示例10: AllRecords

        public List<BlacklistChangeRecord_blc_Info> AllRecords()
        {
            List<BlacklistChangeRecord_blc_Info> listRecord = null;
            try
            {
                StringBuilder sbSQL = new StringBuilder();
                sbSQL.AppendLine(" SELECT blc_cRecordID,blc_iCardNo,blc_cOperation,blc_cOptReason,blc_lIsFinished,blc_cAdd ");
                sbSQL.AppendLine(" ,blc_dAddDate,blc_dFinishDate,cus_cIdentityNum as IdentityNum ");
                sbSQL.AppendLine(" FROM BlacklistChangeRecord_blc WITH(NOLOCK) ");
                sbSQL.AppendLine(" JOIN UserCardPair_ucp WITH(NOLOCK) ON ucp_iCardNo=blc_iCardNo ");
                sbSQL.AppendLine(" JOIN CardUserMaster_cus WITH(NOLOCK) ON cus_cRecordID=ucp_cCUSID ");
                sbSQL.AppendLine(" WHERE blc_lIsFinished=0 ");

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IEnumerable<BlacklistChangeRecord_blc_Info> query = db.ExecuteQuery<BlacklistChangeRecord_blc_Info>(sbSQL.ToString(), new object[] { });
                    if (query != null)
                    {
                        listRecord = query.ToList<BlacklistChangeRecord_blc_Info>();
                    }
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return listRecord;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:29,代码来源:BlacklistChangeRecordDA.cs

示例11: AllRecords

        public List<CardUserAccountDetail_cuad_Info> AllRecords()
        {
            List<CardUserAccountDetail_cuad_Info> listRecord = null;
            try
            {
                StringBuilder sbSQL = new StringBuilder();
                sbSQL.AppendLine("SELECT ");
                sbSQL.AppendLine("* FROM CardUserAccountDetail_cuad WHERE 1 = 1");

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IEnumerable<CardUserAccountDetail_cuad_Info> query = db.ExecuteQuery<CardUserAccountDetail_cuad_Info>(sbSQL.ToString(), new object[] { });
                    if (query != null)
                    {
                        listRecord = query.ToList<CardUserAccountDetail_cuad_Info>();
                    }
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return listRecord;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:25,代码来源:CardUserAccountDetailDA.cs

示例12: DisplayRecord

        public Sys_RoleMaster_rlm_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_RoleMaster_rlm_Info rlm = new Sys_RoleMaster_rlm_Info();
            Sys_RoleMaster_rlm_Info info = new Sys_RoleMaster_rlm_Info();
            rlm = KeyObject as Sys_RoleMaster_rlm_Info;
            try
            {

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IQueryable<Sys_RoleMaster_rlm> taQuery =
                        (from ta in db.Sys_RoleMaster_rlm
                         where ta.rlm_iRecordID == rlm.rlm_iRecordID
                         //orderby dpms.dpm_iRecordID ascending
                         select ta).Take(1);

                    if (taQuery != null)
                    {
                        //foreach (var t in taQuery)
                        foreach (Sys_RoleMaster_rlm t in taQuery)
                        {
                            info = Common.General.CopyObjectValue<Sys_RoleMaster_rlm, Sys_RoleMaster_rlm_Info>(t);
                            FindUserRole(info);
                        }
                    }
                    return info;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:33,代码来源:SysRoleMasterDA.cs

示例13: AllRecords

        public List<Model.HHZX.ConsumerDevice.ConsumeMachineMaster_cmm_Info> AllRecords()
        {
            List<ConsumeMachineMaster_cmm_Info> listRecordInfo = null;
            try
            {
                StringBuilder sbSQL = new StringBuilder();
                sbSQL.AppendLine("SELECT TOP");
                sbSQL.AppendLine(Common.DefineConstantValue.ListRecordMaxCount.ToString());
                sbSQL.AppendLine("* FROM ConsumeMachineMaster_cmm WHERE 1 = 1");

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IEnumerable<ConsumeMachineMaster_cmm_Info> query = db.ExecuteQuery<ConsumeMachineMaster_cmm_Info>(sbSQL.ToString(), new object[] { });
                    if (query != null)
                    {
                        listRecordInfo = query.ToList<ConsumeMachineMaster_cmm_Info>();
                    }
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return listRecordInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:26,代码来源:ConsumeMachineDA.cs

示例14: DisplayRecord

        public Model.HHZX.ConsumerDevice.ConsumeMachineMaster_cmm_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            ConsumeMachineMaster_cmm_Info resInfo = null;
            try
            {
                ConsumeMachineMaster_cmm_Info infoObject = KeyObject as ConsumeMachineMaster_cmm_Info;
                if (infoObject != null)
                {
                    using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                    {
                        ConsumeMachineMaster_cmm record = db.ConsumeMachineMaster_cmm.Where(x => x.cmm_cRecordID == infoObject.cmm_cRecordID).FirstOrDefault();

                        if (record != null)
                        {
                            resInfo = Common.General.CopyObjectValue<ConsumeMachineMaster_cmm, ConsumeMachineMaster_cmm_Info>(record);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return resInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:25,代码来源:ConsumeMachineDA.cs

示例15: InsertRecord

 public Model.General.ReturnValueInfo InsertRecord(Model.HHZX.ConsumerDevice.ConsumeMachineMaster_cmm_Info infoObject)
 {
     ReturnValueInfo rvInfo = new ReturnValueInfo();
     try
     {
         if (infoObject != null)
         {
             using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
             {
                 ConsumeMachineMaster_cmm record = Common.General.CopyObjectValue<ConsumeMachineMaster_cmm_Info, ConsumeMachineMaster_cmm>(infoObject);
                 if (record != null)
                 {
                     db.ConsumeMachineMaster_cmm.InsertOnSubmit(record);
                     db.SubmitChanges();
                     rvInfo.boolValue = true;
                     rvInfo.ValueObject = infoObject;
                 }
                 else
                 {
                     rvInfo.messageText = "TransEntity is null";
                 }
             }
         }
         else
         {
             rvInfo.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_E_ObjectNull;
         }
     }
     catch (Exception ex)
     {
         rvInfo.isError = true;
         rvInfo.messageText = ex.Message;
     }
     return rvInfo;
 }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:35,代码来源:ConsumeMachineDA.cs


注:本文中的SIOTSDB_HHZXDataContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。