예제 #1
0
        public override void onCreateDataRow(ref System.Data.DataRow tempRow, BaseDataTableBuilder builder, int RowIndex, TB_TechniqueLog t)
        {
            TB_TechniqueLogBuilder targetBuilder = builder as TB_TechniqueLogBuilder;

            tempRow[targetBuilder.MissionID]  = t.MissionID;
            tempRow[targetBuilder.Date]       = TechniqueLogController.FormatBmobDate(t.Date);
            tempRow[targetBuilder.Context]    = t.Context;
            tempRow[targetBuilder.LogUrl]     = t.LogUrl;
            tempRow[targetBuilder.Op_Delete]  = targetBuilder.Op_Delete;
            tempRow[targetBuilder.Op_Edit]    = targetBuilder.Op_Edit;
            tempRow[targetBuilder.ID]         = t.objectId;
            tempRow[targetBuilder.IsNeedTidy] = t.IsNeedTidy;
        }
예제 #2
0
        public override TB_TechniqueLog onDesrialize(BaseDataTableBuilder builder, System.Data.DataRow row)
        {
            TB_TechniqueLogBuilder targetBuilder = builder as TB_TechniqueLogBuilder;
            TB_TechniqueLog        tempBean      = new TB_TechniqueLog();

            tempBean.MissionID = row[targetBuilder.MissionID].ToString();
            tempBean.Date      = DateTime.Parse(row[targetBuilder.Date].ToString());
            tempBean.Context   = row[targetBuilder.Context].ToString();
            tempBean.LogUrl    = row[targetBuilder.LogUrl].ToString();
            tempBean.objectId  = row[targetBuilder.ID].ToString();
            tempBean.IsNeedTidy.Set(Boolean.Parse(row[targetBuilder.ID].ToString()));
            return(tempBean);
        }
예제 #3
0
        public override TB_TechniqueLog onDesrialize(BaseDataTableBuilder builder, System.Data.DataRow row, params object[] otherParam)
        {
            TB_TechniqueLogBuilder targetBuilder = builder as TB_TechniqueLogBuilder;
            TB_TechniqueLog        result        = new TB_TechniqueLog();

            result.Context   = row[targetBuilder.Context].ToString();
            result.LogUrl    = row[targetBuilder.LogUrl].ToString();
            result.MissionID = row[targetBuilder.MissionID].ToString();
            result.Date      = LogDate;
            if (string.IsNullOrEmpty(row[targetBuilder.ID].ToString()) == false)
            {
                result.objectId = row[targetBuilder.ID].ToString();
            }
            if (string.IsNullOrEmpty(row[targetBuilder.IsNeedTidy].ToString()) == false)
            {
                result.IsNeedTidy = (Boolean.Parse(row[targetBuilder.IsNeedTidy].ToString()));
            }
            else
            {
                result.IsNeedTidy = false;
            }
            return(result);
        }