Ejemplo n.º 1
0
        public Int32 addEvent(DataRow dr, DataTable dt)
        {
            if (dt != null)
            {
                DataRelationCollection relations = dt.ChildRelations;
                if (relations.Count > 0)
                {
                    DataRelation relationAddress = relations[0];
                    DataRow[] rowsAddress = dr.GetChildRows(relationAddress);
                    foreach (DataRow mRow in rowsAddress)
                    {
                        try
                        {
                            mevent = new cc_event();
                            mevent.mCtr_Event = mRow[gf_main.CTRLEVENT].ToString();
                            mevent.mCtrl_Line = mRow[gf_main.CTRLLINE].ToString();

                            mEventCollection.Add(mevent);
                        }
                        catch (FormatException)
                        {
                        }
                    }
                }
                else
                {
                    try
                    {
                        mevent = new cc_event();
                        mevent.mCtr_Event = dr[gf_main.CTRLTYPE].ToString();
                        mevent.mCtrl_Line = dr[gf_main.CTRLLINE].ToString();

                        mEventCollection.Add(mevent);
                    }
                    catch (FormatException)
                    {
                    }
                }
            }
            return 0;
        }
Ejemplo n.º 2
0
        public Int32 addEvent(DataRow dr, DataTable dt)
        {
            if (dt != null)
            {
                DataRelationCollection relations = dt.ChildRelations;
                if (relations.Count > 0)
                {
                    DataRelation relationAddress = relations[0];
                    DataRow[]    rowsAddress     = dr.GetChildRows(relationAddress);
                    foreach (DataRow mRow in rowsAddress)
                    {
                        try
                        {
                            mevent            = new cc_event();
                            mevent.mCtr_Event = mRow[gf_main.CTRLEVENT].ToString();
                            mevent.mCtrl_Line = mRow[gf_main.CTRLLINE].ToString();

                            mEventCollection.Add(mevent);
                        }
                        catch (FormatException)
                        {
                        }
                    }
                }
                else
                {
                    try
                    {
                        mevent            = new cc_event();
                        mevent.mCtr_Event = dr[gf_main.CTRLTYPE].ToString();
                        mevent.mCtrl_Line = dr[gf_main.CTRLLINE].ToString();

                        mEventCollection.Add(mevent);
                    }
                    catch (FormatException)
                    {
                    }
                }
            }
            return(0);
        }
Ejemplo n.º 3
0
 static public DataTable dtEvent;//event DataTable
 public cc_control()
 {
     mevent = new cc_event();
 }
Ejemplo n.º 4
0
static  public DataTable dtEvent;//event DataTable
        public cc_control()
        {
            mevent = new cc_event();
        }