示例#1
0
        public static int InsertOrUpdateT_EPA_ORGS(global::System.String oRG_ID, global::System.String oRG_NAME)
        {
            using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
            {
                try
                {
                    T_EPA_ORGS a = new T_EPA_ORGS();
                    a.ORG_ID = oRG_ID;
                    if (oRG_NAME != null) a.ORG_FORMAL_NAME = oRG_NAME;
                    a.UPDATE_DT = System.DateTime.Now;
                    ctx.AddToT_EPA_ORGS(a);
                    ctx.SaveChanges();

                    return 1;
                }
                catch (Exception ex)
                {
                    return 0;
                }
            }
        }