public enum ENUM_AccDebitCredit
{
accDR = 1,
accCR = 2
}
I declared this in a class as public ENUM_AccDebitCreditDebitCredit { get; set; }
In my code I tried by filling this enum
from the datatable as follows
DebitCredit = (ENUM_TransactionType)Enum.Parse(typeof(ENUM_TransactionType), rsACC_AccountingRules.Tables[0].Rows[0]["DR"].ToString()) & (ENUM_TransactionType)Enum.Parse(typeof(ENUM_TransactionType), rsACC_AccountingRules.Tables[0].Rows[0]["CR"].ToString());
I would like to have multiple values to be stored in DebitCredit
, how can I do this
My datatable is as follows
DataTable table = new DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Columns.Add("DR", typeof(string));
table.Columns.Add("CR", typeof(string));
table.Rows.Add(25, "1","2"); // enum values