[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[jfriends] Re: [jfriends] Re:�呁滹鶜憌鴥銫憯礗略哆ridCont rol 戊件禾□生件玄卞勾中化
>支反曰﹜仇仇反丐五日戶化dataSet毛銀丹屯五卅及匹仄斤丹井’’’
>公及啃卞反DB失弁本旦井日踏五躂今卅中午中仃卅中及匹﹜匹五木壬�礞惜縣中峇リ馱活�
>犯□正毛弘伉永玉卞刓憎仄凶中分仃匹﹜弘伉永玉曉匹彸螂仄凶中歹仃匹反卅中及匹﹜
>dataSet毛銀丹优邰反卅中及匹允互﹝丹□戈﹝
戈井仄 GridControl 毛銀勻化リ啦及犯□正毛刓憎允月戊□玉毛踏中凶及匹允互
允勻井曰侉木引仄凶﹝
澎葭及田永弁失永皿毛葦凶日仇氏卅戊□玉毛踏中化中引仄凶﹝
引內 jbInit() 匹反﹜
gridControl1.setAutoEdit(false);
gridControl1.setAutoInsert(false);
gridControl1.setColumnCaptions(new String[] {"朿赭抩", "熬恄", "蛙�Я挬�"});
gridControl1.setEditInPlace(false);
本永玄允月丟末永玉匹反﹜
private void setDeliverList(Deliver[] delivers) {
gridControl1.removeAllRows();
if (delivers != null) {
String[][] gitems = // 穡襖匹踏中化丐月及匹鬼中戊□玉及葦呿匹允﹝
new String[delivers.length][3]; // 仇及午五反市仿丞醒互3分勻凶心凶中﹝
for (int i=0; i<delivers.length; i++) {
gridControl1.addRow();
gitems[i][0] = new String(delivers[i].getSectionName());
if (delivers[i].getFinishDate() != null) {
gitems[i][1] = delivers[i].getFinishDate();
} else {
gitems[i][1] = new String("");
}
if (delivers[i].getDisposeDate() != null) {
gitems[i][2] = delivers[i].getFinishDate();
} else {
gitems[i][2] = new String("");
}
}
gridControl1.setItems(gitems);
}
}
丐引曰 Grid 午反楮溢拑中及匹允互﹜delivers 反 弁仿旦 Deliver 及т昫匹﹜
Deliver 反仇氏卅弁仿旦匹允﹝(颱及踏中凶弁仿旦卅及匹目伕目伕匹允)
仇及 GridControl 卞反﹜>т幵芺爛域厖=心凶中卅手及毛刓憎仄凶井勻凶方丹匹允﹝
/**
* т尥芺爛左皮斥尼弁玄
* @xxxxxxxxxx mtc9000.data.Flow
*/
public class Deliver extends Task implements Serializable {
int revision_no;
String dispose_date; // 蛙�Я挬�ゥ
public Deliver() {
}
/**
* 戊疋□戊件旦玄仿弁正□匹允﹝
* @xxxxxxxxxx deliver 戊疋□葭及奶件旦正件旦匹允﹝
* @xxxxxxxxxx 戊疋□葭午き元襖毛儅勻凶蕙凶卅奶件旦正件旦匹允﹝
*/
public Deliver(Deliver deliver) {
super(deliver);
this.revision_no = deliver.revision_no;
this.dispose_date = deliver.dispose_date;
}
/**
* 備白奴□伙玉毛公木冗木賡渝祭允月戊件旦玄仿弁正□匹允﹝
* @xxxxxxxxxx no 仇及т尥芺爛裔肣及�砦璊リ飽ㄅask_no 毛賡渝祭仄引允﹝
* @xxxxxxxxxx due 芺爛ゥ匹允﹝
* @xxxxxxxxxx finish 撢雒ゥ匹允﹝
* @xxxxxxxxxx code_name 仇及芺爛卞瑛太尥仃日木凶厙迕樊及交□扒□ID匹允﹝
* @xxxxxxxxxx user_name 仇及芺爛卞瑛太尥仃日木凶厙迕樊抩匹允﹝
* @xxxxxxxxxx mail_address 仇及芺爛卞瑛太尥仃日木凶厙迕樊及丟□伙失玉伊旦匹允﹝
* @xxxxxxxxxx section_name 仇及芺爛卞瑛太尥仃日木凶厙迕樊及赭簞允月朿赭抩匹允﹝
* @xxxxxxxxxx reason 咥苀匹允﹝
* @xxxxxxxxxx status 芺爛及質咥橇須匹允﹝(質咥醱/質咥蔽弇/拑躲)
* @xxxxxxxxxx revision 仇及芺爛互赭簞允月�リ� node_no 匹允﹝
* @xxxxxxxxxx dispose_date 蛙�Я挬�ゥ匹允﹝
*/
public Deliver( int no,
String due,
String finish,
String code_name,
String user_name,
String mail_address,
String section_name,
String reason,
int status,
int revision,
String dispose_date)
{
super.setTaskNo(no);
super.setDueDate(due);
super.setFinishDate(finish);
super.setCodeName(code_name);
super.setUserName(user_name);
super.setMailAddress(mail_address);
super.setSectionName(section_name);
super.setReason(reason);
super.setStatus(status);//1998.8.31y.e
this.revision_no = revision;
this.dispose_date = dispose_date;//1998.6.29
}
public int getRevisionNo() {
return revision_no;
}
public void setRevisionNo(int Value) {
revision_no = Value;
}
public String getDisposeDate() {
return dispose_date;
}
public void setDisposeDate(String Value) {
dispose_date = Value;
}
}
湘瓖弁仿旦及 Task 反仇氏卅弁仿旦匹允﹝
/**
* 允屯化及芺爛左皮斥尼弁玄(綜嶽/興犖/噩ロ/孺爛﹜т尥)及葭卞卅月鏟擂弁仿旦匹允﹝
* @xxxxxxxxxx mtc9000.data.Flow
* @xxxxxxxxxx mtc9000.data.Deliver
*/
public abstract class Task implements Serializable {
/**
* 質咥橇須白仿弘:質咥醱
* @xxxxxxxxxx mtc9000.data.Task#setStatus()
* @xxxxxxxxxx mtc9000.data.Task#getStatus()
*/
public static final int PROCESSING = 0;
/**
* 質咥橇須白仿弘:質咥蔽弇
* @xxxxxxxxxx mtc9000.data.Task#setStatus()
* @xxxxxxxxxx mtc9000.data.Task#getStatus()
*/
public static final int DONE = 1;
/**
* 質咥橇須白仿弘:拑躲
* @xxxxxxxxxx mtc9000.data.Task#setStatus()
* @xxxxxxxxxx mtc9000.data.Task#getStatus()
*/
public static final int DISABLED = -1;
int task_no;
String class_string = null;
String due_date = null;
String finish_date = null;
String code_name = null;
String user_name = null; // 譯裙穢^^; 1998.6.19 y.e
String mail_address = null; // 譯譯裙穢^^; 1998.9.2y.e
String section_name = null; // 譯裙穢^^; 1998.6.19 y.e
String reason = null;
int status = PROCESSING;
public Task() {
class_string = this.getClass().getName();
}
/**
* 戊疋□戊件旦玄仿弁正□匹允﹝
* @xxxxxxxxxx task 戊疋□葭及奶件旦正件旦匹允﹝
* @xxxxxxxxxx 戊疋□葭午き元襖毛儅勻凶蕙凶卅奶件旦正件旦匹允﹝
*/
public Task(Task task) {
this.task_no = task.task_no;
class_string = this.getClass().getName();
this.due_date = task.due_date;
this.finish_date = task.finish_date;
this.code_name = task.code_name;
this.user_name = task.user_name;
this.mail_address = task.mail_address;
this.section_name = task.section_name;
this.reason = task.reason;
this.status = task.status;//1998.8.31y.e
}
/**
* 備白奴□伙玉毛公木冗木賡渝祭允月戊件旦玄仿弁正□匹允﹝
* @xxxxxxxxxx no 仇及 Task 裔肣及�砦璊リ飽ㄅask_no 毛賡渝祭仄引允﹝
* @xxxxxxxxxx due 芺爛ゥ匹允﹝
* @xxxxxxxxxx finish 撢雒ゥ匹允﹝
* @xxxxxxxxxx code_name 仇及芺爛卞瑛太尥仃日木凶厙迕樊及交□扒□ID匹允﹝
* @xxxxxxxxxx user_name 仇及芺爛卞瑛太尥仃日木凶厙迕樊抩匹允﹝
* @xxxxxxxxxx mail_address 仇及芺爛卞瑛太尥仃日木凶厙迕樊及丟□伙失玉伊旦匹允﹝
* @xxxxxxxxxx section_name 仇及芺爛卞瑛太尥仃日木凶厙迕樊及赭簞允月朿赭抩匹允﹝
* @xxxxxxxxxx reason 咥苀匹允﹝
* @xxxxxxxxxx status 芺爛及質咥橇須匹允﹝(質咥醱/質咥蔽弇/拑躲)
*/
public Task( int no,
String due,
String finish,
String code_name,
String user_name,
String mail_address,
String section_name,
String reason,
int status)
{
class_string = this.getClass().getName();
this.task_no = no;
this.due_date = due;
this.finish_date = finish;
this.code_name = code_name;
this.user_name = user_name;
this.mail_address = mail_address;
this.section_name = section_name;
this.reason = reason;
this.status = status;//1998.8.31y.e
}
// 扔皮弁仿旦毛が讀卞戲嶽 1998.6.19 y.e
public static Task create(String class_string) {
Task task = null;
if (class_string != null && !class_string.equals("")) {
try {
task = (Task)Class.forName(class_string).newInstance();
}
catch (Exception e) {
System.out.println("Class '" + class_string + "' create error.");
e.printStackTrace();
}
}
return task;
}
public String toString() {
if (user_name != null) {
if (section_name != null) {
return user_name + " (" + section_name + ")";
} else {
return user_name;
}
} else {
return code_name;
}
}
public int getTaskNo() {
return task_no;
}
public void setTaskNo(int Value) {
task_no = Value;
}
public String getDueDate() {
return due_date;
}
public void setDueDate(String Value) {
due_date = Value;
}
public String getFinishDate() {
return finish_date;
}
public void setFinishDate(String Value) {
finish_date = Value;
}
public String getCodeName() {
return code_name;
}
public void setCodeName(String Value) {
code_name = Value;
}
public String getUserName() {
return user_name;
}
public void setUserName(String Value) {
user_name = Value;
}
public String getMailAddress() {
return mail_address;
}
public void setMailAddress(String Value) {
mail_address = Value;
}
public String getSectionName() {
return section_name;
}
public void setSectionName(String Value) {
section_name = Value;
}
public String getReason() {
return reason;
}
public void setReason(String Value) {
reason = Value;
}
public int getStatus() {
return status;
}
public void setStatus(int Value) {
status = Value;
}
}
漆莢反颱及識朿毛跤刓仄化心引仄凶﹝^^;
GridControl 及戊□犯奴件弘午 Task﹜Deliver 弁仿旦反中切云丹拑楮溢匹允﹝
方欠仄仁云湊中仄引允﹝
↑ 識朿毛跤釩仄化颱動陸及杅卞恌中仇午互丐月及匹仄斤丹井...^^;
↑↑ 今中五氏 [jfriends] 互 [jbuilder] 祭仄化中月...^^;;;
------------------------------------------------------------------
棄ゞ沷Й (尹氏升丹 支允斗五) <yasuyuki@xxxxxxxxxx>
http://www.javaopen.org/jfriends/ (Java詢踞莘石□丞矢□斥)
堪摯莘模正奶丞奶件正□丟犯奴失 樹扷騷耨扔□申旦朿 TEL 03-5362-9009
◣162-0065 蕙褕嗉蝠脹蠔3-11 蕙褕旦由奶失申伙 FAX 03-5362-9008