////2012.05.11修改(上传二张表的ds 处理加到Q_ZB_FS_FX表里)这个没用了 //public string Q_ZB_FS_FX_add(DataSet DS_Fwxother, DataSet DS_Qskydfjrb) //{ // BLL.Fwx_other B_Fwx_other = new BLL.Fwx_other(); // BLL.Qskyd_fjrb B_Qskydfjrb = new BLL.Qskyd_fjrb(); // string s = common_file.common_app.get_failure; // if (Fwx_other_UploadDS(DS_Fwxother) == common_file.common_app.get_suc)//添加到远程的Fwx_other表成功 // { // DataSet ds_wxf = B_Fwx_other.GetList("1=1"); // if (Add_Q_ZB_FS_FX(ds_wxf, 2) == common_file.common_app.get_suc)//添加到Q_ZB_Fs_fx表里 // { // s = common_file.common_app.get_suc; // } // } // if (Qskyd_fjrb_UploadDS(DS_Qskydfjrb) == common_file.common_app.get_suc)//添加到远程的Qskyd_fjrb表成功 // { // DataSet ds = B_Qskydfjrb.GetList("1=1"); // if (Add_Q_ZB_FS_FX(ds, 1) == common_file.common_app.get_suc)//添加到Q_ZB_Fs_fx表里 // { // s = common_file.common_app.get_suc; // } // } // return s; //} //2012.05.11修改上传二张表的DS,然后加到各自的临时表 Qskyd_fjrb_temp, public string Qskyd_fjrb_temp_ADD(DataSet DS_Fwxother, DataSet DS_Qskydfjrb) { BLL.Fwx_other_temp B_Fwx_other = new BLL.Fwx_other_temp(); BLL.Qskyd_fjrb_temp B_Qskydfjrb = new BLL.Qskyd_fjrb_temp(); string s = common_file.common_app.get_failure; string stryydh = DS_Qskydfjrb.Tables[0].Rows[0]["yydh"].ToString(); if (DS_Fwxother.Tables[0].Rows.Count > 0) { s = Fwx_other_upload(DS_Fwxother, stryydh); //if (Fwx_other_UploadDS(DS_Fwxother) == common_file.common_app.get_suc)//添加到远程的Fwx_other_temp表成功 //{ // DataSet ds_Fwx_other_temp = B_Fwx_other.GetList("yydh='" + stryydh + "'"); // if (Add_Fwx_other(ds_Fwx_other_temp, stryydh) == common_file.common_app.get_suc)//添加到Qskyd_fjrb表里 // { // s = common_file.common_app.get_suc; // } //} } if (DS_Qskydfjrb.Tables[0].Rows.Count > 0) { s = Qskyd_fjrb_upload(DS_Qskydfjrb, stryydh); //if (Qskyd_fjrb_UploadDS(DS_Qskydfjrb) == common_file.common_app.get_suc)//添加到远程的Qskyd_fjrb_temp表成功 //{ // DataSet ds = B_Qskydfjrb.GetList("yydh='"+stryydh+"'"); // if (Add_Qskyd_fjrb(ds,stryydh) == common_file.common_app.get_suc)//添加到Qskyd_fjrb表里 // { // s = common_file.common_app.get_suc; // } //} } return(s); }
public string Qskyd_fjrb_temp_ADD(DataSet DS_Fwxother, DataSet DS_Qskydfjrb) { BLL.Fwx_other_temp B_Fwx_other = new BLL.Fwx_other_temp(); BLL.Qskyd_fjrb_temp B_Qskydfjrb = new BLL.Qskyd_fjrb_temp(); string s = common_file.common_app.get_failure; string stryydh = DS_Qskydfjrb.Tables[0].Rows[0]["yydh"].ToString(); try { if (DS_Fwxother != null && DS_Fwxother.Tables[0].Rows.Count > 0) { Fwx_other_upload(DS_Fwxother, stryydh); } else { string strSql = "delete from Fwx_other where yydh='" + stryydh + "'"; DbHelperSQL.ExecuteSql(strSql); } if (DS_Qskydfjrb != null && DS_Qskydfjrb.Tables[0].Rows.Count > 0) { Qskyd_fjrb_upload(DS_Qskydfjrb, stryydh); } s = common_file.common_app.get_suc; } catch (System.Exception ex) { LogHelper.WriteLog("上传维修房及房间类型信息时出错" + ex.ToString()); } return(s); }
public string Fwx_other_UploadDS(DataSet DS_Fwxother) //上传Fwx_other ds添加到远程表里 { DbHelperSQLP Helpsql = new DbHelperSQLP(); string s = common_file.common_app.get_failure; //id,yydh,qymc,lsbh,fjrb,fjbh,ddsj,lksj,bz,zyzt,czsj,cznr,czy,is_top,is_select,shsc BLL.Fwx_other_temp B_Fwx_other = new BLL.Fwx_other_temp(); Model.Fwx_other_temp M_Fwx_other = new Model.Fwx_other_temp(); if (DS_Fwxother != null && DS_Fwxother.Tables[0].Rows.Count > 0) { string dsqymc = DS_Fwxother.Tables[0].Rows[0]["yydh"].ToString(); DbHelperSQL.ExecuteSql("delete from Fwx_other_temp where yydh='" + dsqymc + "'"); foreach (DataRow dr in DS_Fwxother.Tables[0].Rows) { SqlParameter[] parameters = { new SqlParameter("@yydh", SqlDbType.VarChar, 50), new SqlParameter("@qymc", SqlDbType.VarChar, 50), new SqlParameter("@lsbh", SqlDbType.VarChar, 50), new SqlParameter("@fjrb", SqlDbType.VarChar, 50), new SqlParameter("@fjbh", SqlDbType.VarChar, 50), new SqlParameter("@ddsj", SqlDbType.DateTime), new SqlParameter("@lksj", SqlDbType.DateTime), new SqlParameter("@bz", SqlDbType.VarChar, 50), new SqlParameter("@zyzt", SqlDbType.VarChar, 50), new SqlParameter("@czsj", SqlDbType.DateTime), new SqlParameter("@cznr", SqlDbType.VarChar, 50), new SqlParameter("@czy", SqlDbType.VarChar, 50), new SqlParameter("@is_top", SqlDbType.Bit, 1), new SqlParameter("@is_select", SqlDbType.Bit, 1), new SqlParameter("@shsc", SqlDbType.Bit, 1) }; parameters[0].Value = dr[1]; parameters[1].Value = dr[2]; parameters[2].Value = dr[3]; parameters[3].Value = dr[4]; parameters[4].Value = dr[5]; parameters[5].Value = Convert.ToDateTime(dr[6]); parameters[6].Value = Convert.ToDateTime(dr[7]); parameters[7].Value = dr[8]; parameters[8].Value = dr[9]; parameters[9].Value = Convert.ToDateTime(dr[10]); parameters[10].Value = dr[11]; parameters[11].Value = dr[12]; parameters[12].Value = Convert.ToBoolean(dr[13]); parameters[13].Value = Convert.ToBoolean(dr[14]); parameters[14].Value = true; Helpsql.RunProcedure("Fwx_other_temp_ADD", parameters); s = common_file.common_app.get_suc; } } return(s); }