CEL_Payroll/Payroll.BO/Common/UploadErrorOrSuccess.cs

98 lines
2.5 KiB
C#
Raw Normal View History

2024-09-17 14:30:13 +06:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Payroll.BO
{
[Serializable]
public class UploadErrorOrSuccess
{
#region Properties
public UploadErrorOrSuccess()
{
_sl = 0;
_rowNo = 0;
_columnName = "";
_employeeNo = "";
_empName = "";
_message = "";
}
#region Property SL : int
private int _sl;
public int SL
{
get { return _sl; }
set { _sl = value; }
}
#endregion
#region Property RowNo : int
private int _rowNo;
public int RowNo
{
get { return _rowNo; }
set { _rowNo = value; }
}
#endregion
#region Property ColumName : string
private string _columnName;
public string ColumName
{
get { return _columnName; }
set { _columnName = value; }
}
#endregion
#region Property ColumName : string
private string _employeeNo;
public string EmployeeNo
{
get { return _employeeNo; }
set { _employeeNo = value; }
}
#endregion
#region Property ColumName : string
private string _empName;
public string EmpName
{
get { return _empName; }
set { _empName = value; }
}
#endregion
#region Property Message : string
private string _message;
public string Message
{
get { return _message; }
set { _message = value; }
}
#endregion
public static UploadErrorOrSuccess Create(string columnName, int counter, string errMsg)
{
UploadErrorOrSuccess oitem = new UploadErrorOrSuccess();
oitem.RowNo = counter + 1;
oitem.ColumName = columnName;
oitem.Message = errMsg;
return oitem;
}
public static UploadErrorOrSuccess Create(string columnName, int counter, string errMsg, string empno, string empName)
{
UploadErrorOrSuccess oitem = new UploadErrorOrSuccess();
oitem.RowNo = counter + 1;
oitem.ColumName = columnName;
oitem.Message = errMsg;
oitem.EmployeeNo = empno;
oitem.EmpName = empName;
return oitem;
}
#endregion
}
}