private void UpdateHongKangandMacao(int ncaseIDF, int nCaseIDC, int rowid, string commDB, SqlConnection _connection) { var strSql = "SELECT n_ID FROM dbo.TCode_CaseRelative WHERE s_RelateName='香港申请' AND s_MasterName='国内母案' AND s_SlaveName='香港案' AND s_IPType='P'"; //案件关系配置表 int nIDHongKang = _dbHelper.GetbySql(strSql, commDB, _connection); strSql = "SELECT n_ID FROM dbo.TCode_CaseRelative WHERE s_RelateName='同族专利' AND s_MasterName='同族' AND s_SlaveName='同族' AND s_IPType='P'"; int nIDTong = _dbHelper.GetbySql(strSql, commDB, _connection); strSql = "SELECT n_CaseIDA FROM TCase_CaseRelative WHERE n_CaseIDB=" + ncaseIDF + " AND n_CodeRelativeID=" + nIDHongKang;//查找所有香港申请案件 DataTable table = _dbHelper.GetDataTablebySql(strSql, _connection); for (int i = 0; i < table.Rows.Count; i++) { var _dealingCaseToCase = new dealingCaseToCase(); _dealingCaseToCase.InsertIntoLaw(nCaseIDC, int.Parse(table.Rows[i]["n_CaseIDA"].ToString()), nIDTong, rowid, "同族", commDB, _connection); } }
public int InsertMacaoApplication(DataRow dr, int rowid, string commDB, SqlConnection _connection) { string sNo = dr["EARLIER"].ToString().Trim(); int HKNum = _dbHelper.GetIDbyName(sNo, 2, _connection); int MacaoID = _dbHelper.GetIDbyName(dr["LATER"].ToString().Trim(), 2, _connection); if (HKNum.Equals(0)) { _dbHelper.InsertLog(0, sNo, rowid, "澳门案件", "澳门案件-" + rowid, "未找到“我方卷号”为:" + sNo, "", commDB, _connection); return(0); } else { const string strSql = "SELECT n_ID FROM dbo.TCode_CaseRelative WHERE s_RelateName='澳门延伸' AND s_MasterName='国内母案' AND s_SlaveName='澳门延伸' AND s_IPType='P'"; int n_ID = _dbHelper.GetbySql(strSql, commDB, _connection); var _dealingCaseToCase = new dealingCaseToCase(); _dealingCaseToCase.InsertIntoLaw(HKNum, MacaoID, n_ID, rowid, "", commDB, _connection); UpdateHongKangandMacao(HKNum, MacaoID, rowid, commDB, _connection);//同步香港和澳门案件同族 return(1); } }