Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSapjcriteria(ref DataRow row, Sapjcriteria entity)
 {
     row.SetField("iCono", entity.iCono);
     row.SetField("cOper", entity.cOper);
     row.SetField("cQueueName", entity.cQueueName);
     row.SetField("queueinfo1", entity.queueinfo1);
     row.SetField("queueinfo2", entity.queueinfo2);
     row.SetField("cGroup", entity.cGroup);
     row.SetField("cFunction", entity.cFunction);
     row.SetField("cStartType", entity.cStartType);
     row.SetField("startdt", entity.startdt);
     row.SetField("fromhour", entity.fromhour);
     row.SetField("fromminute", entity.fromminute);
     row.SetField("fromam", entity.fromam);
     row.SetField("tohour", entity.tohour);
     row.SetField("tominute", entity.tominute);
     row.SetField("toam", entity.toam);
     row.SetField("cPrinterType", entity.cPrinterType);
     row.SetField("cPrinterValue", entity.cPrinterValue);
     row.SetField("printerhidden", entity.printerhidden);
     row.SetField("RptType", entity.rptType);
     row.SetField("cInUseValue", entity.cInUseValue);
     row.SetField("cReportnm", entity.cReportnm);
     row.SetField("timezoneclient", entity.timezoneclient);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Sapjcriteria BuildSapjcriteriaFromRow(DataRow row)
        {
            Sapjcriteria entity = new Sapjcriteria();

            entity.iCono          = row.IsNull("iCono") ? 0 : row.Field <int>("iCono");
            entity.cOper          = row.IsNull("cOper") ? string.Empty : row.Field <string>("cOper");
            entity.cQueueName     = row.IsNull("cQueueName") ? string.Empty : row.Field <string>("cQueueName");
            entity.queueinfo1     = row.IsNull("queueinfo1") ? string.Empty : row.Field <string>("queueinfo1");
            entity.queueinfo2     = row.IsNull("queueinfo2") ? string.Empty : row.Field <string>("queueinfo2");
            entity.cGroup         = row.IsNull("cGroup") ? string.Empty : row.Field <string>("cGroup");
            entity.cFunction      = row.IsNull("cFunction") ? string.Empty : row.Field <string>("cFunction");
            entity.cStartType     = row.IsNull("cStartType") ? string.Empty : row.Field <string>("cStartType");
            entity.startdt        = row.Field <DateTime?>("startdt");
            entity.fromhour       = row.IsNull("fromhour") ? 0 : row.Field <int>("fromhour");
            entity.fromminute     = row.IsNull("fromminute") ? 0 : row.Field <int>("fromminute");
            entity.fromam         = row.IsNull("fromam") ? string.Empty : row.Field <string>("fromam");
            entity.tohour         = row.IsNull("tohour") ? 0 : row.Field <int>("tohour");
            entity.tominute       = row.IsNull("tominute") ? 0 : row.Field <int>("tominute");
            entity.toam           = row.IsNull("toam") ? string.Empty : row.Field <string>("toam");
            entity.cPrinterType   = row.IsNull("cPrinterType") ? string.Empty : row.Field <string>("cPrinterType");
            entity.cPrinterValue  = row.IsNull("cPrinterValue") ? string.Empty : row.Field <string>("cPrinterValue");
            entity.printerhidden  = row.Field <bool>("printerhidden");
            entity.rptType        = row.IsNull("RptType") ? string.Empty : row.Field <string>("RptType");
            entity.cInUseValue    = row.IsNull("cInUseValue") ? string.Empty : row.Field <string>("cInUseValue");
            entity.cReportnm      = row.IsNull("cReportnm") ? string.Empty : row.Field <string>("cReportnm");
            entity.timezoneclient = row.IsNull("timezoneclient") ? 0 : row.Field <int>("timezoneclient");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }