Introduction:
Today , we discussed about Mandatory Label in C#.Net. This label intimate to user ,It is a Mandatory Field.
Today , we discussed about Mandatory Label in C#.Net. This label intimate to user ,It is a Mandatory Field.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace StaffingSolutionV1.UtilityLayer
{
class MandatoryLable :Label
{
public enum StatusManLabel
{
False,
True
};
private StatusManLabel m_Status;
public string AddSymbol
{
get;
set;
}
public StatusManLabel StatusLabel
{
get
{
return m_Status;
}
set
{
if (value == StatusManLabel.True)
{
this.Text = AddSymbol + " " + this.Text; }
else
{
AddSymbol = ""; this.Text = "";
}
m_Status = value;
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace StaffingSolutionV1.UtilityLayer
{
class MandatoryLable :Label
{
public enum StatusManLabel
{
False,
True
};
private StatusManLabel m_Status;
public string AddSymbol
{
get;
set;
}
public StatusManLabel StatusLabel
{
get
{
return m_Status;
}
set
{
if (value == StatusManLabel.True)
{
this.Text = AddSymbol + " " + this.Text; }
else
{
AddSymbol = ""; this.Text = "";
}
m_Status = value;
}
}
}
}
No comments:
Post a Comment