protected override ResultStatus CheckShield() { base.CheckShield(gcMain); if (!IsDataModify(gcMain)) { return(ResultStatus.Fail); } DataTable dtMain = (DataTable)gcMain.DataSource; foreach (DataRow row in dtMain.Rows) { if (row.RowState != DataRowState.Deleted && row.RowState != DataRowState.Unchanged) { row["TXN_W_USER_ID"] = GlobalInfo.USER_ID; row["TXN_W_TIME"] = DateTime.Now; } } string[] allowNullColumnList = { "TXN_RMARK", "TXN_AUDIT", "OP_TYPE" }; if (!GridHelper.CheckRequired(gcMain, allowNullColumnList)) { return(ResultStatus.FailButNext); } return(ResultStatus.Success); }
protected override ResultStatus CheckShield() { base.CheckShield(gcMain); if (!IsDataModify(gcMain)) { return(ResultStatus.Fail); } DataTable dt = (DataTable)gcMain.DataSource; foreach (DataRow row in dt.Rows) { if (row.RowState != DataRowState.Deleted && row.RowState != DataRowState.Unchanged) { string UPF_USER_ID = row["UPF_USER_ID"].AsString().Trim(); if (!string.IsNullOrEmpty(row["MODIFY_MARK"].ToString().Trim())) { row["UPF_W_USER_ID"] = GlobalInfo.USER_ID; row["UPF_W_TIME"] = DateTime.Now; row["UPF_CHANGE_FLAG"] = "Y"; char[] userId = UPF_USER_ID.ToCharArray(); Array.Reverse(userId); row["UPF_PASSWORD"] = DateTime.Now.ToString("MMdd") + 'm' + new string(userId); } string[] allowNullColumnList = { "UPF_LOCK_TIME" }; if (!GridHelper.CheckRequired(gcMain, allowNullColumnList)) { return(ResultStatus.Fail); } } } return(ResultStatus.Success); }