public long f_delt_dw_row(long al_dw, ref str_win_dw9 a5wd, long al_xuhao) { f_dw_l_idid(al_dw, ref a5wd, 0); return(f_delt_dw_row(ref a5wd.dw0[al_dw], ref a5wd.l_focuschanged, al_xuhao)); }
public long f_clicked(ref long al_dw, ref long row, ref string dwo, ref str_win_dw9 a5wd) { f_dw_l_idid(al_dw, ref a5wd, row); //if (row < 0 || row > a5wd.dw0[al_dw].RowCount() ) //{ // if (a5wd.dw0[al_dw].Tag.ToString().Substring(0,1) == "3" ) // return 0; // f_dw_l_idid(al_dw,ref a5wd,0); // return 0; //} //// 更新页面需要编辑时才不选中行 开始 //switch (a5wd.dw0[al_dw].Tag.ToString().Substring(0,1)) //{ // case "2": // if a5wd.dw0[al_dw].getcolumnname() <> dwo.name or a5wd.dw0[al_dw].getrow() <> row then // f_dddw_original(a5wd.dw0[al_dw]) // a5wd.l_dropdown_show = 1 // end if // if mid(a5wd.dw0[al_dw].tag,6,1) = "N" then return 0 // if dwo.type = "column" then // if a5wd.dw0[al_dw].Describe(dwo.name+'.background.mode') ="0" then // a5wd.dw0[al_dw].SetColumn(string(dwo.name)) // a5wd.dw0[al_dw].SelectRow(0,false) // f_dw_l_idid(al_dw,a5wd,0) // return 0 // end if // else // a5wd.dw0[al_dw].SelectRow(0,false) // f_dw_l_idid(al_dw,a5wd,0) // return 0 // end if // a5wd.dw0[al_dw].setrow(row); // f_t_rowfocuschanging(-22,row,al_dw,a5wd); // return 0 // case '3' // if a5wd.dw0[al_dw].getcolumnname() <> dwo.name or a5wd.dw0[al_dw].getrow() <> row then // f_dddw_original(a5wd.dw0[al_dw]) // a5wd.l_dropdown_show = 1 // end if // if mid(a5wd.dw0[al_dw].tag,6,1) = "N" then return 0 // a5wd.dw0[al_dw].SelectRow(0,false) // f_dw_l_idid(al_dw,a5wd,0) // return 0 // case else // if mid(a5wd.dw0[al_dw].tag,6,1) = "N" then return 0 // if dwo.type = "column" then a5wd.dw0[al_dw].SetColumn(string(dwo.name)) //} //// 更新页面需要编辑时才不选中行 结束 //if a5wd.dw0[al_dw].GetRow() = row then // if keydown(KeyControl!) then // f_dw_l_idid(al_dw,a5wd,0) // a5wd.dw0[al_dw].SelectRow(row, not a5wd.dw0[al_dw].IsSelected(row)) // return 0 // elseif keydown(KeyShift!) then // f_dw_l_idid(al_dw,a5wd,0) // elseif keydown(KeyAlt!) then // f_dw_l_idid(al_dw,a5wd,0) // else // if a5wd.l_focuschanged = 998 or a5wd.l_selectrow [al_dw] = 0 then a5wd.dw0[al_dw].post event rowfocuschanged(row) // f_dw_l_idid(al_dw,a5wd,row) // if not a5wd.dw0[al_dw].IsSelected(row) then // a5wd.dw0[al_dw].selectrow(0,false) // a5wd.dw0[al_dw].SelectRow(row, true) // end if // end if //else // a5wd.dw0[al_dw].ScrolltoRow(row); //end if return(0); }
public long f_t_rowfocuschanged(long currentrow, long al_index1, long al_index3, ref str_win_dw9 a5wd) { switch (a5wd.l_focuschanged) { case 999: // update后导致的焦点改变,retrieve浏览页面前 return(0); case 998: // update后导致的焦点改变,retrieve浏览页面后 a5wd.l_focuschanged = 0; break; case 888: // constructor后导致的焦点改变 return(0); case 777: //retrieve 后导致的焦点改变 return(0); case 666: //多行删除选中行后导致的焦点改变 return(0); case 555: //双击列名排序、单击列名 return(0); case 444: //在rowfocuschanging中设置,不执行rowfocuschanged中的预定代码 return(0); } if (a5wd.dw0[al_index1] == null) { return(0); } switch (a5wd.dw0[al_index1].Tag.ToString().Substring(0, 1)) { case "2": case "3": { if (currentrow >= 0) { return(0); } else if (currentrow > -2147483600) //2147483647 { currentrow = -currentrow; } } break; } long ll_i = 0; if (currentrow == -2147483647) //9 - 24 { if (a5wd.b_dw0[al_index3] && a5wd.b_dw0[al_index3 + 32] && a5wd.l_idid[al_index1] >= 0) { a5wd.dw0[al_index3].Retrieve(a5wd.l_idid[al_index1]); a5wd.b_dw0[ll_i + 32] = false; } } else // 1 - 8 { //if a5wd.dw0[al_index1].Describe(a5wd.s_id_n[al_index1]+'.coltype') <> "long" then return 0 if (a5wd.l_selectrow[al_index1] < 0 || currentrow <0 || currentrow> a5wd.dw0[al_index1].rowcount() || a5wd.l_selectrow[al_index1] > a5wd.dw0[al_index1].rowcount()) { f_dw_l_idid(al_index1, ref a5wd, 0); return(0); } else if (a5wd.l_selectrow[al_index1] != currentrow) { //MessageBox.Show("系统发生了错误,请与 系统管理员 联系,l_selectrow:" + a5wd.l_selectrow[al_index1].ToString() + "currentrow:" + currentrow.ToString()); //f_dw_l_idid(al_index1, ref a5wd, 0); //return 0; } if (al_index3 < 0) { return(0); } if (a5wd.b_dw0[al_index3] && a5wd.b_dw0[al_index3 + 32]) { a5wd.dw0[al_index3].Retrieve(a5wd.l_idid[al_index1]); a5wd.b_dw0[ll_i + 32] = false; } } return(0); }
public void f_dw_l_idid(long al_dw, ref str_win_dw9 a5wd, long al_selectrow) { a5wd.l_selectrow[al_dw] = al_selectrow; long ll_i; if (a5wd.l_selectrow[al_dw] >= 0 && a5wd.l_selectrow[al_dw] <= a5wd.dw0[al_dw].rowcount()) { if (a5wd.s_id_n.Length >= al_dw) { if (a5wd.s_id_n[al_dw] != "") { switch (a5wd.dw0[al_dw].IdDataType) { case "long": case "ulong": case "int": { if (a5wd.l_idid[al_dw] != Common.GetLong(a5wd.dw0[al_dw].GetItemData(a5wd.l_selectrow[al_dw], a5wd.s_id_n[al_dw]))) { if (a5wd.s_selectionchanged.Substring(0, 5) == "list8") // w_t_list8、w_t_list16使用 { if (a5wd.b_dw0.Length >= 25) { for (ll_i = 25; ll_i <= 32; ll_i++) { if (a5wd.b_dw0[ll_i]) { a5wd.dw0[ll_i].reset(); a5wd.b_dw0[ll_i + 32] = true; //判断dw是否已经retrieve了 true表示没有retrieve,false表示已经retrieve了 } } } else if (al_dw <= 8) // w_t_t9等模板使用 { if (a5wd.b_dw0.Length >= 9) { for (ll_i = 9; ll_i <= 16; ll_i++) { if (a5wd.b_dw0[ll_i]) { a5wd.dw0[ll_i].reset(); a5wd.b_dw0[ll_i + 32] = true; //判断dw是否已经retrieve了 true表示没有retrieve,false表示已经retrieve了 } } } } } a5wd.l_idid[al_dw] = Common.GetLong(a5wd.dw0[al_dw].GetItemData(a5wd.l_selectrow[al_dw], a5wd.s_id_n[al_dw])); } } break; default: { a5wd.l_idid[al_dw] = 0; break; } } } else { a5wd.l_idid[al_dw] = 0; } } else { a5wd.l_idid[al_dw] = 0; } } else { a5wd.l_selectrow[al_dw] = 0; a5wd.l_idid[al_dw] = 0; if (a5wd.s_selectionchanged.Substring(0, 5) == "list8") {// w_t_list8、w_t_list16使用 if (a5wd.b_dw0.Length >= 25) { for (ll_i = 25; ll_i <= 32; ll_i++) { if (a5wd.b_dw0[ll_i]) { a5wd.dw0[ll_i].reset(); a5wd.b_dw0[ll_i + 32] = true; //判断dw是否已经retrieve了 true表示没有retrieve,false表示已经retrieve了 } } } else if (al_dw <= 8) {// w_t_t9等模板使用 if (a5wd.b_dw0.Length >= 9) { for (ll_i = 9; ll_i <= 16; ll_i++) { if (a5wd.b_dw0[ll_i]) { a5wd.dw0[ll_i].reset(); } a5wd.b_dw0[ll_i + 32] = true; //判断dw是否已经retrieve了 true表示没有retrieve,false表示已经retrieve了 } } } } } }
public void f_constr_win0(string as_username, string as_winname, ref str_sys_dw a5dww, ref str_win_dw9 a5wd) { string ls_tab_h = ""; string sql = "select top 1 colname,dw_2_3 .header_color,header_fontcolor,header_fontsize,header_fontface,header_height,detail_fontsize,detail_fontface,detail_height,detail_color1,detail_color2,detail_color3,detail_fontcolor1,detail_fontcolor2,detail_fontcolor3,detail_input_bcoloro,detail_input_bcolorm,dw_color,getdate() "+ " from mis_dw_argument WITH (NOLOCK) " + " where user_name1 = :as_username and window1 = :as_winname and dataobject = '' "; global.gu_pub1.il_getdate = DateTime.Now.Millisecond; if (a5dww.detail_color1 != "") { f_constr_color0_get(ref a5dww); } if (a5wd.l_tab3 >= 1 && ls_tab_h != "") { global.gu_pub1.f_s_listtoarray(ls_tab_h, ",", ref a5wd.d_tab_h); //string[] ss = ls_tab_h.Split(','); ; //a5wd.d_tab_h = ss.Select(x => Convert.ToDouble(x)).ToArray(); } if (a5wd.d_tab_h.Length < 48 && a5wd.l_tab3 >= 0) { a5wd.d_tab_h = new double[] { 0, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } ; }
public void f_open0(str_win_dw9 a5wd) { //第一位 // 0 表示主dw(表头)为list,不可更新,为grid // 1 表示此dw(表体)为list,不可更新,为grid // 2 表示此dw(表体)为update,可更新,多条数据,为grid // 3 表示此dw(表体)为update,可更新,单条数据,为freeform //第二三位 dw的代码,没有意义,只是为了区分,和第一位组合后不可重复 //第四位 sql语句是否初始化,Y代表已初始化 //第五位 是否可排序,Y代表可以排序 //第六位 行是否可被选中,Y代表可以被选中 //第七位 按enter键,光标跳转方式,H代表下一格,V代表下一行 //为了下标从1开始,多定义一维 a5wd.b_dw0 = new bool[66] { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true }; // a5wd.b_dw0[ll_i] = false dw是否可用 // a5wd.b_dw0[ll_i + 32] = true // tab_t3需要retrieve // a5wd.b_dw0[65]代表可否修改数据 a5wd.l_tab3 = 0; // 0代表没有tab_t3, 1 代表list9-16, 2代表update17-24, 3代表此界面没有tab_t3但其他界面有 a5wd.s_cx_sql = new string[9] { "", "", "", "", "", "", "", "", "" }; a5wd.s_id_n = new string[9]; a5wd.s_tb_n = new string[9]; a5wd.s_sql_n = new string[9]; a5wd.s_cx_text = new string[9]; a5wd.s_cx_sql = new string[9]; a5wd.s_gjz_sqlname = new string[9]; a5wd.s_gjz_colname = new string[9]; a5wd.s_gjz_coltype = new string[9]; a5wd.l_selectrow = new long[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; //选中的行号 a5wd.l_idid = new long[9]; a5wd.l_oldindex = 1; a5wd.b_itemerror = true; // 是否触发itemerror a5wd.l_focuschanged = 0; // 是否改变了焦点 a5wd.b_log_pb = false; // 是否记录用户的操作日志 a5wd.b_newrow = false; // 是否新增加的记录,针对表头 a5wd.l_newindex = 1; a5wd.s_selectionchanged = "default"; a5wd.s_resize = "h1"; a5wd.s_updtend = "n_n"; a5wd.l_save_cpu = 0; a5wd.d_tab_h = new double[] { 0, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; // //datawindow idw_lis0,idw_updat0 //datawindow idw_updat1_1,idw_updat1_2,idw_updat1_3,idw_updat1_4,idw_updat1_5,idw_updat1_6,idw_updat1_7,idw_updat1_8 //datawindow idw_lis1_1,idw_lis1_2,idw_lis1_3,idw_lis1_4,idw_lis1_5,idw_lis1_6,idw_lis1_7,idw_lis1_8 //string is_sql_cxtj="",is_id_name="",is_tb_name="",is_sql_name="" //long il_selectrow = 0,il_id = 0,il_oldindex=1 //string is_localize_title="",is_localize_input="" //boolean a5wd.b_updt = false // 是否具有编辑权限 //boolean ib_itemerror = true // 是否触发itemerror //boolean ib_itemfocuschanged = true // 是否改变了焦点 //string is_gjz_text="",is_gjz_colname[1]="",is_gjz_coltype = "string",is_gjz_col_fl //boolean ib_log_pb = false // 是否记录用户的操作日志 //long il_insted_id[],il_updtd_id[],il_deltd_id[] //boolean ib_newrow = false // 是否新增加的记录,针对表头 //string is_wintitle a5wd.s_gjz_text = ""; a5wd.b_updt = false; // 是否具有编辑权限 a5wd.dw0 = new DataWindow[65]; }