示例#1
0
        public static string GetObjectName(string code)
        {
            string text2;

            try
            {
                string text = "";
                if (code == "")
                {
                    return(text);
                }
                EntityData remindObjectByCode = RemindDAO.GetRemindObjectByCode(code);
                if (remindObjectByCode.HasRecord())
                {
                    text = remindObjectByCode.GetString("ObjectName");
                }
                remindObjectByCode.Dispose();
                text2 = text;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(text2);
        }
示例#2
0
 private void dgRemindList_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
 {
     try
     {
         string     strKey = this.dgRemindList.DataKeys[(int)e.Item.ItemIndex].ToString();
         EntityData entity = RemindDAO.GetRemindObjectByCode(strKey);
         RemindDAO.DeleteRemindObject(entity);
         entity.Dispose();
         this.LoadData();
     }
     catch (Exception ex)
     {
         ApplicationLog.WriteLog(this.ToString(), ex, "获取提醒列表失败");
     }
 }
示例#3
0
        public static string GetFieldName(string Code, string FieldName)
        {
            string text2;

            try
            {
                string text = "";
                if (Code == "")
                {
                    return(text);
                }
                EntityData remindObjectByCode = RemindDAO.GetRemindObjectByCode(Code);
                if (remindObjectByCode.HasRecord() && remindObjectByCode.CurrentTable.Columns.Contains(FieldName))
                {
                    if (remindObjectByCode.CurrentTable.Columns[FieldName].DataType == Type.GetType("System.Int32"))
                    {
                        return(remindObjectByCode.GetIntString(FieldName));
                    }
                    if (remindObjectByCode.CurrentTable.Columns[FieldName].DataType == Type.GetType("System.Decimal"))
                    {
                        return(remindObjectByCode.GetDecimalString(FieldName));
                    }
                    if (remindObjectByCode.CurrentTable.Columns[FieldName].DataType == Type.GetType("System.DateTime"))
                    {
                        return(remindObjectByCode.GetDateTimeOnlyDate(FieldName));
                    }
                    if (remindObjectByCode.CurrentTable.Columns[FieldName].DataType == Type.GetType("System.String"))
                    {
                        return(remindObjectByCode.GetString(FieldName));
                    }
                }
                text2 = text;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(text2);
        }