Пример #1
0
 public static UserInClientList EditUserInclient(String mapinID)
 {
     UserInClientList mapp = new UserInClientList();
     try
     {
     IMapping objtext = new BALClient();
     mapp = (UserInClientList)objtext.EditMapping(Convert.ToInt64(mapinID));
     }
     catch (Exception ex)
     {
     throw;
     }
     return mapp;
 }
Пример #2
0
        public static UserInClientList EditUserInClient(Int64 MapId)
        {
            UserInClientList Mapping = new UserInClientList();
            using (var context = new SycousCon())
            {
                try
                {
                    var parmode = new SqlParameter
                    {
                        ParameterName = "mode",
                        Value = 4,
                        Direction = ParameterDirection.Input
                    };

                    var parMapID = new SqlParameter
                    {
                        ParameterName = "MapID",
                        Value = MapId.ToString(),
                        Direction = ParameterDirection.Input
                    };
                    Mapping = context.ExecuteStoreQuery<UserInClientList>("exec UserInClientMapping @mode,@MapID", parmode, parMapID).FirstOrDefault();
                }
                catch (Exception ex)
                {
                    context.Dispose();
                    throw;
                }
            }
            return Mapping;
        }