本文整理汇总了C#中Personal类的典型用法代码示例。如果您正苦于以下问题:C# Personal类的具体用法?C# Personal怎么用?C# Personal使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Personal类属于命名空间,在下文中一共展示了Personal类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetalleDiagramacion
public DetalleDiagramacion(Deporte deporte, int item, string dia_semana, Sector sector, Horario hora_desde,
Horario hora_hasta, Personal profesor)
{
Deporte = deporte;
Item = item;
Dia_semana = dia_semana;
Sector = sector;
Hora_desde = hora_desde;
Hora_hasta = hora_hasta;
Profesor = profesor;
}
示例2: Button1_Click
protected void Button1_Click(object sender, EventArgs e)
{
if (IsValid)
{
if (int.Parse(cmbPersonal.SelectedValue) > 0 )
{
persona = Personal.FindOne(Expression.Eq("IdEmpleados", int.Parse(cmbPersonal.SelectedValue)));
FillGrid();
}
}
}
示例3: DetalleDiagramacion
public DetalleDiagramacion(Diagramacion diagramacion, int item, Dia dia_semana, Sector sector,
Horario hora_desde, Horario hora_hasta, Personal profesor, bool lugar_confirmado, bool horario_confirmado,
bool profesor_confirmado)
{
Diagramacion = diagramacion;
Item = item;
Dia_semana = dia_semana;
Sector = sector;
Hora_desde = hora_desde;
Hora_hasta = hora_hasta;
Profesor = profesor;
Lugar_confirmado = lugar_confirmado;
Horario_confirmado = horario_confirmado;
Profesor_confirmado = profesor_confirmado;
}
示例4: cvPersona_ServerValidate
protected void cvPersona_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = false;
persona = Personal.GetById(cmbPersonal.SelectedValue);
if (persona.email != null)
{
args.IsValid = true;
}
else
{
args.IsValid = false;
cvPersona.ErrorMessage = persona.Apellido + "," + persona.Nombres + " no tiene un email valido ";
}
}
示例5: Deserialize
/// <summary>Takes the remaining content of the stream and deserialze it into the instance.</summary>
public static Personal.Person Deserialize(Stream stream, Personal.Person instance)
{
if (instance.Phone == null)
instance.Phone = new List<Personal.Person.PhoneNumber>();
while (true)
{
int keyByte = stream.ReadByte();
if (keyByte == -1)
break;
// Optimized reading of known fields with field ID < 16
switch (keyByte)
{
// Field 1 LengthDelimited
case 10:
instance.Name = global::SilentOrbit.ProtocolBuffers.ProtocolParser.ReadString(stream);
continue;
// Field 2 Varint
case 16:
instance.Id = (int)global::SilentOrbit.ProtocolBuffers.ProtocolParser.ReadUInt64(stream);
continue;
// Field 3 LengthDelimited
case 26:
instance.Email = global::SilentOrbit.ProtocolBuffers.ProtocolParser.ReadString(stream);
continue;
// Field 4 LengthDelimited
case 34:
// repeated
instance.Phone.Add(Personal.Person.PhoneNumber.DeserializeLengthDelimited(stream));
continue;
}
var key = global::SilentOrbit.ProtocolBuffers.ProtocolParser.ReadKey((byte)keyByte, stream);
// Reading field ID > 16 and unknown field ID/wire type combinations
switch (key.Field)
{
case 0:
throw new global::SilentOrbit.ProtocolBuffers.ProtocolBufferException("Invalid field id: 0, something went wrong in the stream");
default:
global::SilentOrbit.ProtocolBuffers.ProtocolParser.SkipKey(stream, key);
break;
}
}
return instance;
}
示例6: butGuardar_Click
private void butGuardar_Click(object sender, EventArgs e)
{
string sex =""+comboSexo.SelectedItem;
Personal p = new Personal();
p.Cedula = textCedula.Text;
p.Nombre = textNombres.Text;
p.Apellido = textApellidos.Text;
p.Cargo = textCargo.Text;
p.Titulo = textTitulo.Text;
p.Correo = textCorreo.Text;
p.Sexo = sex[0];
p.Ciudad = textCiudad.Text;
p.Direccion = textDireccion.Text;
p.Telefono = textTelefono.Text;
p.Tipo = Convert.ToString(comboTipo.SelectedItem);
p.DataFoto = ImageToByte(picture);
PersonalCd.Create(p);
frmap.dataGridView1.Update();
}
示例7: Usage
private static void Usage () {
Console.WriteLine ("brief");
Console.WriteLine ("");
{
#pragma warning disable 219
Reset Dummy = new Reset ();
#pragma warning restore 219
Console.Write ("{0}reset ", UsageFlag);
Console.WriteLine ();
Console.WriteLine (" Delete all test profiles");
}
{
#pragma warning disable 219
Device Dummy = new Device ();
#pragma warning restore 219
Console.Write ("{0}device ", UsageFlag);
Console.Write ("[{0}] ", Dummy.DeviceID.Usage (null, "id", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage (null, "dd", UsageFlag));
Console.Write ("[{0}] ", Dummy.Default.Usage ("default", "value", UsageFlag));
Console.WriteLine ();
Console.WriteLine (" Create new device profile");
}
{
#pragma warning disable 219
Personal Dummy = new Personal ();
#pragma warning restore 219
Console.Write ("{0}personal ", UsageFlag);
Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
Console.Write ("[{0}] ", Dummy.Description.Usage (null, "pd", UsageFlag));
Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceNew.Usage ("new", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage ("dudf", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceID.Usage ("did", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage ("dd", "value", UsageFlag));
Console.WriteLine ();
Console.WriteLine (" Create new personal profile");
}
{
#pragma warning disable 219
Label Dummy = new Label ();
#pragma warning restore 219
Console.Write ("{0}label ", UsageFlag);
Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
Console.WriteLine ();
Console.WriteLine (" Create new security label");
}
{
#pragma warning disable 219
Add Dummy = new Add ();
#pragma warning restore 219
Console.Write ("{0}add ", UsageFlag);
Console.WriteLine ();
Console.WriteLine (" Add user to a label");
}
{
#pragma warning disable 219
Remove Dummy = new Remove ();
#pragma warning restore 219
Console.Write ("{0}remove ", UsageFlag);
Console.WriteLine ();
Console.WriteLine (" Remove user from a label");
}
{
#pragma warning disable 219
Rekey Dummy = new Rekey ();
#pragma warning restore 219
Console.Write ("{0}rekey ", UsageFlag);
Console.WriteLine ();
Console.WriteLine (" Create a new label key and recryption keys");
//.........这里部分代码省略.........
示例8: GetAuthenUser
/// <summary>
/// 实现ESB用户到授权用户的装换
/// </summary>
/// <param name="person"></param>
/// <returns></returns>
public static AuthenUser GetAuthenUser(Personal person)
{
AuthenUser authenUser = new AuthenUser();
authenUser.IsSystemAdmin = (person.permission == 0);
authenUser.UserID = person.PersonalID;
authenUser.UserName = person.PersonalName;
authenUser.LoginName = person.PersonalAccount;
authenUser.IsVisitor = false;
return authenUser;
}
示例9: Personal
/// <summary>
/// Create a new personal profile
/// </summary>
/// <param name="Options">Command line parameters</param>
public override void Personal(Personal Options) {
SetReporting(Options.Report, Options.Verbose);
var Address = Options.Portal.Value;
Utils.Assert((Address != null & Address != ""), "Must specify account");
// See if the portal exists and will accept the specified account name.
GetMeshClient(Address);
var AccountAvailable = MeshClient.Validate(AccountID);
if (!AccountAvailable.Valid) {
if (Options.Next.Value) {
GetNextAccount();
}
else {
Utils.Error("Portal refused account {0} because {1}",
Address, AccountAvailable.Reason);
}
}
// Get / create the device profile if required
RegistrationDevice RegistrationDevice = null;
bool Generate = false;
if (Options.DeviceNew.Value) {
Generate = true;
}
else if (Options.DeviceUDF.Value != null) {
// use the profile with the specified fingerprint
var Found = Machine.GetUDF(Options.DeviceUDF.Value, out RegistrationDevice);
Utils.Assert(Found, "Could not find profile " + Options.DeviceUDF.Value);
}
else if (Options.DeviceID.Value != null) {
// use the profile with the specified ID
var Found = Machine.GetID(Options.DeviceID.Value, out RegistrationDevice);
Utils.Assert(Found, "Could not find profile " + Options.DeviceID.Value);
}
else if (Machine.Device != null) {
RegistrationDevice = Machine.Device;
}
else {
Generate = true;
}
// Generate a new device profile
if (Generate) {
var DeviceID = Utils.Default(Options.DeviceID.Value, "Default");
var DeviceDescription = Utils.Default(Options.DeviceDescription.Value, "Unknown");
var NewProfileDevice = new SignedDeviceProfile(DeviceID, DeviceDescription);
RegistrationDevice = Machine.Add(NewProfileDevice);
}
var ProfileDevice = RegistrationDevice.Device;
var PersonalProfile = new PersonalProfile(ProfileDevice);
var SignedPersonalProfile = PersonalProfile.Signed;
// add to the machine registry
Machine.Add(SignedPersonalProfile, PortalID);
// Register with the Mesh portal
var PublishResult = MeshClient.Publish(SignedPersonalProfile);
Utils.Assert(PublishResult.Status.StatusSuccess(), "Portal refused profile publication request");
Report("Created new personal profile {0}", SignedPersonalProfile.UDF);
Report("Device profile is {0}", ProfileDevice.UDF);
Report("Profile registered to {0}", PortalID);
}
示例10: btnComenzarCarga_Click
protected void btnComenzarCarga_Click(object sender, EventArgs e)
{
if (IsValid)
{
Solicitud Sol = Solicitud.GetById(BiFactory.Sol.Id_Solicitud);
SolicitudTareasGenerales sol_Tg = SolicitudTareasGenerales.FindFirst(Expression.Eq("IdSolicitud", BiFactory.Sol.Id_Solicitud));
if (sol_Tg == null)
{
sol_Tg = new SolicitudTareasGenerales();
sol_Tg.IdSolicitud = Sol.Id_Solicitud;
sol_Tg.Descripcion = Sol.Descripcion;
}
sol_Tg.FechaInicio = AntaresHelper.FechaNula();
sol_Tg.FechaFin = AntaresHelper.FechaNula();
sol_Tg.Duracion = 0;
sol_Tg.IdTipotarea = int.Parse(cmbTipoTarea.SelectedValue);
sol_Tg.IdEmpleado = BiFactory.Empleado.IdEmpleados;
sol_Tg.SaveAndFlush();
txtHorasPersonalDia.Text = string.Empty;
ddlHorasPersonalHoras.SelectedIndex = 0;
DateTime fechaInicio = Sol.FechaCreacion;
DateTime fechaFin = DateTime.MinValue;
this.Persona = Personal.GetById(sol_Tg.IdEmpleado.ToString());
litHorasPersonalPersona.Text = Persona.Apellido + "," + Persona.Nombres;
cmpVFecha.ValueToCompare = DateTime.Today.ToString("dd/MM/yyyy");
FillHorasPersonalGrid(0);
}
}
示例11: CardInserted
public void CardInserted(Personal personal)
{
if (personal == null)
return;
lbl_cid.BeginInvoke(new MethodInvoker(delegate { lbl_cid.Text = personal.Citizenid; }));
lbl_birthday.BeginInvoke(new MethodInvoker(delegate { lbl_birthday.Text = personal.Birthday.ToString("dd/MM/yyyy"); }));
lbl_sex.BeginInvoke(new MethodInvoker(delegate { lbl_sex.Text = personal.Sex; }));
lbl_th_prefix.BeginInvoke(new MethodInvoker(delegate { lbl_th_prefix.Text = personal.Th_Prefix; }));
lbl_th_firstname.BeginInvoke(new MethodInvoker(delegate { lbl_th_firstname.Text = personal.Th_Firstname; }));
lbl_th_lastname.BeginInvoke(new MethodInvoker(delegate { lbl_th_lastname.Text = personal.Th_Lastname; }));
lbl_en_prefix.BeginInvoke(new MethodInvoker(delegate { lbl_en_prefix.Text = personal.En_Prefix; }));
lbl_en_firstname.BeginInvoke(new MethodInvoker(delegate { lbl_en_firstname.Text = personal.En_Firstname; }));
lbl_en_lastname.BeginInvoke(new MethodInvoker(delegate { lbl_en_lastname.Text = personal.En_Lastname; }));
lbl_issue.BeginInvoke(new MethodInvoker(delegate { lbl_issue.Text = personal.Issue.ToString("dd/MM/yyyy"); }));
lbl_expire.BeginInvoke(new MethodInvoker(delegate { lbl_expire.Text = personal.Expire.ToString("dd/MM/yyyy"); }));
pictureBox1.BeginInvoke(new MethodInvoker(delegate { pictureBox1.Image = personal.PhotoBitmap; }));
lbl_alarmMessage.BeginInvoke(new MethodInvoker(delegate { lbl_alarmMessage.Text = "กรุณาตรวจสอบข้อมูล"; }));
lbl_alarmMessage.BeginInvoke(new MethodInvoker(delegate { lbl_alarmMessage.ForeColor = System.Drawing.Color.Green; }));
lbl_alarmMessage.BeginInvoke(new MethodInvoker(delegate { lbl_alarmMessage.Visible = true; }));
}
示例12: Deserialize
/// <summary>Helper: put the buffer into a MemoryStream before deserializing</summary>
public static Personal.Person.PhoneNumber Deserialize(byte[] buffer, Personal.Person.PhoneNumber instance)
{
using (var ms = new MemoryStream(buffer))
Deserialize(ms, instance);
return instance;
}
示例13: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if ((Request.QueryString["Id"] != null))
{
IdSolicitudRecurso = int.Parse(Request.QueryString["Id"].ToString());
SolicitudRecursosEmpleados s = SolicitudRecursosEmpleados.FindFirst(Expression.Eq("Id", IdSolicitudRecurso));
//SolicitudRendicionPersonalHoras ph = SolicitudRendicionPersonalHoras.fin
IdSolicitud = s.IdSolicitud;
IdPersona = s.IdEmpleado;
FechaRango r = Solicitud.PeriodoDesdeHasta(s.IdSolicitud);
makeCboFecha(r);
p = Personal.GetById(s.IdEmpleado.ToString());
txtPersona.Text = p.Apellido + "," + p.Nombres;
}
}
fillGrid();
}
示例14: Usage
private static void Usage () {
Console.WriteLine ("brief");
Console.WriteLine ("");
{
#pragma warning disable 219
Reset Dummy = new Reset ();
#pragma warning restore 219
Console.Write ("{0}reset ", UsageFlag);
Console.WriteLine ();
Console.WriteLine (" Delete all test profiles");
}
{
#pragma warning disable 219
Device Dummy = new Device ();
#pragma warning restore 219
Console.Write ("{0}device ", UsageFlag);
Console.Write ("[{0}] ", Dummy.DeviceID.Usage (null, "id", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage (null, "dd", UsageFlag));
Console.Write ("[{0}] ", Dummy.Default.Usage ("default", "value", UsageFlag));
Console.WriteLine ();
Console.WriteLine (" Create new device profile");
}
{
#pragma warning disable 219
Personal Dummy = new Personal ();
#pragma warning restore 219
Console.Write ("{0}personal ", UsageFlag);
Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
Console.Write ("[{0}] ", Dummy.Description.Usage (null, "pd", UsageFlag));
Console.Write ("[{0}] ", Dummy.Next.Usage ("next", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceNew.Usage ("new", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage ("dudf", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceID.Usage ("did", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage ("dd", "value", UsageFlag));
Console.WriteLine ();
Console.WriteLine (" Create new personal profile");
}
{
#pragma warning disable 219
Register Dummy = new Register ();
#pragma warning restore 219
Console.Write ("{0}register ", UsageFlag);
Console.Write ("[{0}] ", Dummy.UDF.Usage (null, "udf", UsageFlag));
Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
Console.WriteLine ();
Console.WriteLine (" Register the specified profile at a new portal");
}
{
#pragma warning disable 219
Sync Dummy = new Sync ();
#pragma warning restore 219
Console.Write ("{0}sync ", UsageFlag);
Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
Console.WriteLine ();
Console.WriteLine (" Synchronize local copies of Mesh profiles with the server");
}
{
#pragma warning disable 219
Escrow Dummy = new Escrow ();
#pragma warning restore 219
Console.Write ("{0}escrow ", UsageFlag);
Console.Write ("[{0}] ", Dummy.Quorum.Usage ("quorum", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Shares.Usage ("shares", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
Console.WriteLine ();
Console.WriteLine (" Create a set of key escrow shares");
//.........这里部分代码省略.........
示例15: Handle_Personal
private static void Handle_Personal (
Shell Dispatch, string[] args, int index) {
Personal Options = new Personal ();
var Registry = new Goedel.Registry.Registry ();
Options.Portal.Register ("portal", Registry, (int) TagType_Personal.Portal);
Options.Description.Register ("pd", Registry, (int) TagType_Personal.Description);
Options.Verbose.Register ("verbose", Registry, (int) TagType_Personal.Verbose);
Options.Report.Register ("report", Registry, (int) TagType_Personal.Report);
Options.DeviceNew.Register ("new", Registry, (int) TagType_Personal.DeviceNew);
Options.DeviceUDF.Register ("dudf", Registry, (int) TagType_Personal.DeviceUDF);
Options.DeviceID.Register ("did", Registry, (int) TagType_Personal.DeviceID);
Options.DeviceDescription.Register ("dd", Registry, (int) TagType_Personal.DeviceDescription);
// looking for parameter Param.Name}
if (index < args.Length && !IsFlag (args [index][0] )) {
// Have got the parameter, call the parameter value method
Options.Portal.Parameter (args [index]);
index++;
}
// looking for parameter Param.Name}
if (index < args.Length && !IsFlag (args [index][0] )) {
// Have got the parameter, call the parameter value method
Options.Description.Parameter (args [index]);
index++;
}
#pragma warning disable 162
for (int i = index; i< args.Length; i++) {
if (!IsFlag (args [i][0] )) {
throw new System.Exception ("Unexpected parameter: " + args[i]);}
string Rest = args [i].Substring (1);
TagType_Personal TagType = (TagType_Personal) Registry.Find (Rest);
// here have the cases for what to do with it.
switch (TagType) {
case TagType_Personal.Verbose : {
int OptionParams = Options.Verbose.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.Verbose.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.Report : {
int OptionParams = Options.Report.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.Report.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.DeviceNew : {
int OptionParams = Options.DeviceNew.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.DeviceNew.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.DeviceUDF : {
int OptionParams = Options.DeviceUDF.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.DeviceUDF.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.DeviceID : {
int OptionParams = Options.DeviceID.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.DeviceID.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.DeviceDescription : {
int OptionParams = Options.DeviceDescription.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
//.........这里部分代码省略.........