• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Objects.ObjectParameter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: CreateDisbursementBySRF

        public List<Disbursement> CreateDisbursementBySRF(User createdBy, int stationeryRetrievalFormId)
        {
            try
            {
                ObjectParameter message = new ObjectParameter("Message", typeof(string));

                int errorCode = context.CreateDisbursementsBySRFId(stationeryRetrievalFormId,
                                                                   createdBy.UserID, message);

                if (errorCode == -1)
                    throw new Exceptions.StationeryRetrievalException(message.Value.ToString());
                else
                {
                    return
                        FindDisbursementByCriteria(new DisbursementSearchDTO()
                            {
                                StationeryRetrievalFormID = stationeryRetrievalFormId
                            });
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }
开发者ID:chutinhha,项目名称:logic-university-stationery-store-inventory-system,代码行数:25,代码来源:DisbursementDAO.cs


示例2: Actualiza

        public int Actualiza(int pIntIdExpediente, int pIntIdProyecto, String pStrDescripcion, String pStrEspecificaciones,
            Decimal pDecValorReferencial, String pStrTipoEjecutor, String pStrNomEjecutor, String pStrApeEjecutor, String pStrRazonSocialEjecutor,
            String pStrNomContacto, String pStrApeContaco, String pStrEmailContacto,
            String pStrTelfContacto, String pStrDireccionContacto, String pStrNomSupervisor,
            String pStrApeSupervisor, String pStrTelfSupervisor, String pStrEmailSupervisor,
            int pIntIdEjecutor, int pIntIdContacto, int pIntIdSupervisor, List<DocumentoExpedienteTecnicoOP> pLstDocumentos)
        {
            int intResultado = -999;

            try
            {
                ObrasPublicasEntities objContext = new ObrasPublicasEntities();

                ObjectParameter objResult = new ObjectParameter("pIntIdExp_out", typeof(int));

                objContext.sp_gop_upd_exp(pIntIdExpediente, pIntIdProyecto, pStrDescripcion, pStrEspecificaciones, pDecValorReferencial,
                   pStrTipoEjecutor, pStrNomEjecutor, pStrApeEjecutor, pStrRazonSocialEjecutor, pStrNomContacto,
                   pStrApeContaco, pStrEmailContacto, pStrTelfContacto, pStrDireccionContacto, pStrNomSupervisor, pStrApeSupervisor,
                   pStrTelfSupervisor, pStrEmailSupervisor, pIntIdEjecutor, pIntIdContacto,pIntIdSupervisor, objResult);

                var lstDocumentos = objContext.OP_DOCUMENTO_EXPEDIENTE_TECNICO.Where(doc => doc.coExpediente == pIntIdExpediente).ToList();

                foreach (OP_DOCUMENTO_EXPEDIENTE_TECNICO objDoc in lstDocumentos)
                {
                    objContext.OP_DOCUMENTO_EXPEDIENTE_TECNICO.DeleteObject(objDoc);
                }

                if (pLstDocumentos != null)
                {
                    foreach (DocumentoExpedienteTecnicoOP objDocumento in pLstDocumentos)
                    {
                        OP_DOCUMENTO_EXPEDIENTE_TECNICO objDocumentoExpTec = new OP_DOCUMENTO_EXPEDIENTE_TECNICO();
                        objDocumentoExpTec.coExpediente = pIntIdExpediente;
                        objDocumentoExpTec.feEmision = objDocumento.FechaEmision;
                        objDocumentoExpTec.noTipoDocExpTec = objDocumento.TipoDocumento;
                        objDocumentoExpTec.nuNroDOcumento = objDocumento.NroDocumento;
                        objDocumentoExpTec.txDescripcion = objDocumento.Descripcion;
                        objDocumentoExpTec.txRutaArchivo = objDocumento.RutaArchivo;
                        objDocumentoExpTec.nomArchivo = objDocumento.NomArchivo;
                        objContext.AddToOP_DOCUMENTO_EXPEDIENTE_TECNICO(objDocumentoExpTec);
                    }
                }
                objContext.SaveChanges();

                int intIdExpediente = Convert.ToInt32(objResult.Value.ToString());

                if (intIdExpediente > 0)
                {
                    intResultado = 1;
                }
                else{
                    intResultado = intIdExpediente;
                }
            }
            catch (Exception ex)
            {

            }
            return intResultado;
        }
开发者ID:apizarroe,项目名称:Repositorio_SanIsidro_201502,代码行数:60,代码来源:ExpedienteTecnicoOP_DAL.cs


示例3: SP_GrabarIngreso

        public RespuestaSP SP_GrabarIngreso(SG_INGRESOS ing, int ID_USR)
        {
            RespuestaSP result = new RespuestaSP();
            ExecuteManager(uow =>
            {
                //var manager = new SG_INGRESOSManager(uow);
                var context = (CityTruckContext)uow.Context;
                ObjectParameter p_res = new ObjectParameter("p_res", typeof(String));
                context.P_SG_GUARDAR_INGRESOS(ing.ID_INGRESO, ing.FECHA, ing.CONCEPTO, ing.ID_CAJA, ing.IMPORTE, ID_USR, ing.ID_AMORTIZACION,p_res);

                try
                {
                    int result_id = Int32.Parse(p_res.Value.ToString());
                    if (result_id > 0)
                    {
                        result.success = true;
                        result.msg = "Proceso Ejecutado Correctamente";
                        result.id = result_id;
                    }
                    else
                    {
                        result.success = false;
                        result.msg = p_res.Value.ToString();
                        result.id = -1;
                    }
                }
                catch (FormatException e)
                {
                    result.success = false;
                    result.msg = p_res.Value.ToString();
                    result.id = -1;
                }
            });
            return result;
        }
开发者ID:uvillazon,项目名称:citytruck,代码行数:35,代码来源:IngresosServices.cs


示例4: Get

        // GET api/userevents/5
        public ReturnValue Get(int id)
        {
            if (id < 0)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            ReturnValue returnValue = new ReturnValue();

            try
            {
                ObjectParameter TotalCount = new ObjectParameter("TotalCount", typeof(int));
                returnValue.value = entity.UserEventGetList(id, TotalCount).ToList<UserEventGetList_Result>();

                returnValue.totalcount = (int)TotalCount.Value;
                returnValue.code = 0;
                returnValue.msg = "succes";
            }
            catch
            {
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }

            return returnValue;
        }
开发者ID:imfree-pro,项目名称:imfree,代码行数:26,代码来源:UserEventsController.cs


示例5: Button_Click_1

        private void Button_Click_1(object sender, System.Windows.RoutedEventArgs e)
        {
            //string connectionString = "data source=АЛЕКСЕЙ-ПК;initial catalog=myDataBase;persist security info=True;user id=human;password=human;MultipleActiveResultSets=True;";
            //SqlConnection connDBPageOptions = new SqlConnection(connectionString);

            //try
            //{
            //    conn.Open();
            //}
            //catch (SqlException se)
            //{
            //    Console.WriteLine("Ошибка подключения:{0}", se.Message);
            //}
            //Console.WriteLine("Соедение успешно произведено");
            
            using( DBPageOptionsEntities dbPageOptions = new DBPageOptionsEntities() )
            {
                ObjectParameter lenParameter = new ObjectParameter("Len", typeof(int));
                dbPageOptions.Len(lenParameter);
                int len = Convert.ToInt32(lenParameter.Value);

                if (len != 0)
                {
                    dbPageOptions.Delete();
                }
                
                dbPageOptions.Insert(TBox_0.Text, "Text");
                dbPageOptions.Insert(TBox_1.Text, "Request");
                dbPageOptions.Insert(CBox_0.SelectedItem.ToString(), "Service");
                dbPageOptions.Insert(CBox_1.SelectedItem.ToString(), "Service");

                dbPageOptions.SaveChanges();
            }
        }
开发者ID:WakeDown,项目名称:Unit,代码行数:34,代码来源:CreatePage.xaml.cs


示例6: sendSMS

 public bool sendSMS(string shortcode, string msg, string msisdn, string operador)
 {
     ObjectParameter id = new ObjectParameter("id", typeof(int));
     var oper = operador == "movistar" ? "MOVPERU" : (operador == "claro" ? "CLAROPERU" : (operador == "comcel" ? operador.ToUpper() : "TELCEL"));
     var id_operator = (from op in _repository.tbl_operator where op.name == oper select op.id_operator).First();
     var id_sc = (from s in _repository.tbl_sms_sc where (s.sc == shortcode) && (s.id_operator == id_operator) select s.id_sc).First();
     try
     {
         if (operador == "claro")
         {
             ClaroSMS.sendClaroPeru(msisdn, msg, shortcode);
             _repository.sp_inject_mt((new Random().Next(9999)).ToString(), 3100, Int64.Parse(msisdn), msg, "", int.Parse(id_sc.ToString()), "t");
             return true;
         }
         else
         {
             _repository.sp_inject_mt((new Random().Next(9999)).ToString(), 3100, Int64.Parse(msisdn), msg, "", int.Parse(id_sc.ToString()), "t");
             return true;
         }
     }
     catch (Exception ex)
     {
         return false;
     }
 }
开发者ID:josev55,项目名称:Statistics,代码行数:25,代码来源:SupportService.cs


示例7: SP_GuardarTransferencia

        public RespuestaSP SP_GuardarTransferencia(SG_TRANSFERENCIAS transferencia, int ID_USR)
        {
            RespuestaSP result = new RespuestaSP();
            ExecuteManager(uow =>
            {
                var context = (CityTruckContext)uow.Context;
                ObjectParameter p_res = new ObjectParameter("p_res", typeof(String));
                context.P_SG_GUARDAR_TRANFERENCIA(transferencia.ID_TRANSFERENCIA,transferencia.ID_CAJA_ORIGEN,transferencia.ID_CAJA_DESTINO,transferencia.FECHA,transferencia.CONCEPTO,transferencia.IMPORTE_BS,transferencia.OBSERVACION, ID_USR, p_res);
                try
                {
                    int result_id = Int32.Parse(p_res.Value.ToString());
                    if (result_id > 0)
                    {
                        result.success = true;
                        result.msg = "Proceso Ejecutado Correctamente";
                        result.id = result_id;
                    }
                    else
                    {
                        result.success = false;
                        result.msg = p_res.Value.ToString();
                        result.id = -1;
                    }
                }
                catch (FormatException e)
                {
                    result.success = false;
                    result.msg = p_res.Value.ToString();
                    result.id = -1;
                }

            });
            return result;
        }
开发者ID:uvillazon,项目名称:citytruck,代码行数:34,代码来源:TransferenciasServices.cs


示例8: SetUserSessions

        public static void SetUserSessions(string qcb_stUsrName)
        {
            try
            {
                SUContext db = new SUContext();
                UserSessionVM userSession = new UserSessionVM();
                //For geting user id
                var getUserId = from userId in db.Users
                             where userId.LoginName== qcb_stUsrName
                             select new {userId.LoginName, userId.UserId,userId.Name, userId.CanBeGM, userId.IsAdmin };
                foreach (var item in getUserId)
                {
                    userSession.UserId = item.UserId;
                    userSession.LoginName = item.LoginName;
                    userSession.UserName = item.Name;
                    userSession.CanBeGM = item.CanBeGM;
                    userSession.IsAdmin = item.IsAdmin;
                }
                using (SUContext context = new SUContext())
                {
                    //userSession.UserRights = context.sp_GetSecAttribs(qcb_stUsrName).ToList();
                    var token = new ObjectParameter("f_uidSessionToken", typeof(string));
                    //var result = context.sp_SessCreateToken(qcb_stUsrName, token);

                    if (token.Value != null)
                        userSession.UserSessionToken = (string)token.Value;

                    HttpContext.Current.Session["UserSession"] = userSession;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:HansLeuschner,项目名称:SU,代码行数:35,代码来源:SessionUsers.cs


示例9: InsereRaio

 public int InsereRaio(int idPesquisa, string point, string distancia)
 {
     ObjectParameter pIdPesquisa = new ObjectParameter("pIdPesquisa", idPesquisa);
     ObjectParameter pointParameter = new ObjectParameter("pPonto", point);
     ObjectParameter distanceParameter = new ObjectParameter("pDistancia", distancia);
     return base.ExecuteFunction("InsereRaio", pIdPesquisa, pointParameter, distanceParameter);
 }
开发者ID:nandokmk,项目名称:tcc_imoveis,代码行数:7,代码来源:tcc_imoveisEntities.cs


示例10: pacjenciMiastoLista2

        public virtual ObjectResult<string> pacjenciMiastoLista2(string parametr, ObjectParameter listaPacjentow)
        {
            var parametrParameter = parametr != null ?
                new ObjectParameter("parametr", parametr) :
                new ObjectParameter("parametr", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<string>("pacjenciMiastoLista2", parametrParameter, listaPacjentow);
        }
开发者ID:Nitjsefni,项目名称:PZ-WSR,代码行数:8,代码来源:Model1.Context.cs


示例11: ilePacjentow

        public virtual int ilePacjentow(string miasto, ObjectParameter liczba)
        {
            var miastoParameter = miasto != null ?
                new ObjectParameter("miasto", miasto) :
                new ObjectParameter("miasto", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("ilePacjentow", miastoParameter, liczba);
        }
开发者ID:Nitjsefni,项目名称:PZ-WSR,代码行数:8,代码来源:Model1.Context.cs


示例12: addHeadimg

        public virtual int addHeadimg(string imgPath, ObjectParameter imgID)
        {
            var imgPathParameter = imgPath != null ?
                new ObjectParameter("imgPath", imgPath) :
                new ObjectParameter("imgPath", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("addHeadimg", imgPathParameter, imgID);
        }
开发者ID:BrefCool,项目名称:ITBLOGwebsite,代码行数:8,代码来源:blogDataModel.Context.cs


示例13: AddCountryDal

 public string AddCountryDal(string f  , string Country, string isdcode, string Indiacalling, string countrycode, string currency, string impnotice, string importantnotice)
 {
     string Msg = string.Empty;
     ObjectParameter Opmsg = new ObjectParameter("Msg", typeof(string));
     int t = inv.Add_CountryInsert_tab(f, Country, isdcode, Indiacalling, countrycode, currency, impnotice, importantnotice, Opmsg);
     Msg = Convert.ToString(Opmsg.Value);
     return Msg;
 }
开发者ID:spsinghdocument,项目名称:MVC3SG,代码行数:8,代码来源:Add_CountryInsert.cs


示例14: spGetUserID

     public virtual int spGetUserID(string userName, ObjectParameter userId)
     {
         var userNameParameter = userName != null ?
             new ObjectParameter("userName", userName) :
             new ObjectParameter("userName", typeof(string));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("spGetUserID", userNameParameter, userId);
     }
开发者ID:flatmerge,项目名称:FlatMerge.com,代码行数:8,代码来源:FmModel.Context.cs


示例15: aspnet_Applications_CreateApplication

     public virtual int aspnet_Applications_CreateApplication(string applicationName, ObjectParameter applicationId)
     {
         var applicationNameParameter = applicationName != null ?
             new ObjectParameter("ApplicationName", applicationName) :
             new ObjectParameter("ApplicationName", typeof(string));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("aspnet_Applications_CreateApplication", applicationNameParameter, applicationId);
     }
开发者ID:barisariburnu,项目名称:social-student,代码行数:8,代码来源:eYillikDB.Context.cs


示例16: GetInvoicePOByPOId

 public static Invoice_PO GetInvoicePOByPOId(APCEntities APCContext, int poId)
 {
     ObjectParameter[] listParameter = new ObjectParameter[1];
     listParameter[0] = new ObjectParameter("POId", poId);
     if (APCContext.Invoice_PO.Where("it.PO.Id= @POId", listParameter).Count() > 0)
         return APCContext.Invoice_PO.Where("it.PO.Id= @POId", listParameter).First();
     return null;
 }
开发者ID:budmul,项目名称:ProjectArcon,代码行数:8,代码来源:BLInvoice.cs


示例17: sp_reset_event_derivatives

        public virtual ObjectResult<sp_reset_event_derivatives_Result> sp_reset_event_derivatives(Nullable<long> eventID, ObjectParameter success, ObjectParameter errMsg)
        {
            var eventIDParameter = eventID.HasValue ?
                new ObjectParameter("eventID", eventID) :
                new ObjectParameter("eventID", typeof(long));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<sp_reset_event_derivatives_Result>("sp_reset_event_derivatives", eventIDParameter, success, errMsg);
        }
开发者ID:chharam,项目名称:Capstone_IPM_RV,代码行数:8,代码来源:DataContext.cs


示例18: sp_delete_sitetype_dependants

        public virtual ObjectResult<sp_delete_sitetype_dependants_Result> sp_delete_sitetype_dependants(Nullable<long> typeID, ObjectParameter success, ObjectParameter errMsg)
        {
            var typeIDParameter = typeID.HasValue ?
                new ObjectParameter("typeID", typeID) :
                new ObjectParameter("typeID", typeof(long));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<sp_delete_sitetype_dependants_Result>("sp_delete_sitetype_dependants", typeIDParameter, success, errMsg);
        }
开发者ID:chharam,项目名称:Capstone_IPM_RV,代码行数:8,代码来源:DataContext.cs


示例19: InsertLanguage

     public virtual int InsertLanguage(ObjectParameter newID, string name)
     {
         var nameParameter = name != null ?
             new ObjectParameter("name", name) :
             new ObjectParameter("name", typeof(string));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("InsertLanguage", newID, nameParameter);
     }
开发者ID:AndrewMack,项目名称:EFTest,代码行数:8,代码来源:PeopleModel.Context.cs


示例20: FindSupplierIncomesForPeriodOfTime

 static decimal FindSupplierIncomesForPeriodOfTime(string name, DateTime startDate, DateTime endDate)
 {
     using (NorthwindEntities nwDb = new NorthwindEntities())
     {
         var outputParameter = new ObjectParameter("result", typeof(decimal));
         nwDb.FindTotalSupplierIncomes(name,startDate,endDate, outputParameter);
         return decimal.Parse(outputParameter.Value.ToString());
     }
 }
开发者ID:nim-ohtar,项目名称:TelerikAcademy-2,代码行数:9,代码来源:Program.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Objects.ObjectStateEntry类代码示例发布时间:2022-05-26
下一篇:
C# Edm.StoreItemCollection类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap