public DataSet GetData() { string strxm = ""; string strfromId = ""; string strtoid = ""; try { if (m_request != null && m_request.Tables.Count > 0) { strxm = m_request.Tables[0].Rows[0]["xm"].ToString(); strfromId = m_request.Tables[0].Rows[0]["fromId"].ToString(); strtoid = m_request.Tables[0].Rows[0]["toid"].ToString(); } if (strxm == "" || strfromId == "" ||strtoid == "") { throw new Exception("参数为空"); } string[] strParam = new string[3]; string[] strValue = new string[3]; strParam[0] = "@xm"; strParam[1] = "@fromId"; strParam[2] = "@toid"; strValue[0] = strxm; strValue[1] = strfromId; strValue[2] = strtoid; Dbconn conn = new Dbconn("DpPrint_ESB"); DataSet ds = conn.GetDataSetBySP("printsku_DL20150117", strParam, strValue); ArrayList columnList = new ArrayList(); columnList.Add("SKUID"); columnList.Add("ID0"); columnList.Add("ID"); columnList.Add("SEQ"); columnList.Add("SKU"); for (int i = 0; i < ds.Tables[0].Columns.Count; i++) { if(! columnList.Contains(ds.Tables[0].Columns[i].ColumnName.ToUpper())) { ds.Tables[0].Columns.Remove(ds.Tables[0].Columns[i].ColumnName); i--; } } return ds; } catch { throw; } }
/// <summary> /// 编辑用户信息 /// </summary> /// <returns></returns> public bool Execute() { Dbconn conn = new Dbconn("MDM_Master"); Dbconn conn_Market = new Dbconn("MDM_Market"); try { string strexpression_id = m_request.Tables[0].Rows[0]["expression_id"].ToString(); string strbody_id = m_request.Tables[0].Rows[0]["body_id"].ToString(); string struser_login_name = m_request.Tables[0].Rows[0]["user_login_name"].ToString(); string struser_name = m_request.Tables[0].Rows[0]["user_name"].ToString(); string struser_notuse = m_request.Tables[0].Rows[0]["user_notuse"].ToString(); string strAction = m_request.Tables[0].Rows[0]["Action"].ToString(); DataSet ds = conn_Market.GetDataSet(@"SELECT [Body_ID] FROM [MKT_User_CN_For_HZY_F22] WHERE User_Login_Name=@Param0",new string[1]{struser_login_name}); //如果是添加,先核对用户ID对不对 if (strAction == "Add" && ds.Tables[0].Rows.Count>0) { throw new Exception("要添加的用户登录名已经存在,请核对"); } if (strAction == "Add") { strbody_id = conn.GetDataTable("SELECT NEWID() as ID", new string[0]).Rows[0][0].ToString(); conn.GetDataSetBySP("SP_CreateMasterData", new string[2] { "@MDMName", "@bodyID" }, new string[2] { "User", strbody_id }); AddNewRow(conn, strbody_id, struser_name, struser_login_name, struser_notuse); } else { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strbody_id = ds.Tables[0].Rows[i]["Body_ID"].ToString(); AddNewRow(conn, strbody_id, struser_name, struser_login_name, struser_notuse); } } return true; } catch { throw; } }
public DataSet GetData() { string strdt1 = ""; string strdt2 = ""; string strpp = ""; string strlx = ""; try { if (m_request != null && m_request.Tables.Count > 0) { strdt1 = m_request.Tables[0].Rows[0]["datetimemin"].ToString(); strdt2 = m_request.Tables[0].Rows[0]["datetimemax"].ToString(); strpp = m_request.Tables[0].Rows[0]["brand"].ToString(); strlx = m_request.Tables[0].Rows[0]["season"].ToString(); } if (strdt1 == "" || strdt2 == "" || strpp == "") { throw new Exception("参数为空"); } string[] strParam = new string[4]; string[] strValue = new string[4]; strParam[0] = "@DT1"; strParam[1] = "@DT2"; strParam[2] = "@PP"; strParam[3] = "@LB"; strValue[0] = strdt1; strValue[1] = strdt2; strValue[2] = strpp; strValue[3] = strlx; Dbconn conn = new Dbconn("ERP_PROD"); DataSet ds = conn.GetDataSetBySP("SP_PLM_WHLOCount", strParam, strValue); return ds; } catch { throw; } }
/// <summary> /// 根据AML语言执行对应的存储过程并返回结果 /// </summary> /// <returns></returns> public DataSet GetData() { try { strDBConnName = m_request.Tables[0].Rows[0]["DBCfgName"].ToString(); strSPName = m_request.Tables[0].Rows[0]["SPName"].ToString(); strInputFormat = m_request.Tables[0].Rows[0]["InputFormat"].ToString().ToUpper(); strInputFormatSPSupport = m_request.Tables[0].Rows[0]["InputFormatSPSupport"].ToString(); strOutputContentType = m_request.Tables[0].Rows[0]["OutputContentType"].ToString(); strConditionStr = m_request.Tables[0].Rows[0]["ConditionStr"].ToString(); } catch (Exception) { throw; } //判断存储过程支持的格式与传入的格式,如果不支持,需要进行转换 if (strInputFormatSPSupport.IndexOf(strInputFormat) == -1) { //XML转成AML if (strInputFormat == "XML" && strConditionStr!="") { DataSet ds1 = Common.Common.GetDSByExcelXML(strConditionStr); strConditionStr = Common.Common.GetAMLByDs(ds1); strInputFormat = "AML"; } //AML转成XML else if (strInputFormat == "AML" && strConditionStr != "") { DataSet ds1 = Common.Common.GetDsByAML(strConditionStr); strConditionStr = Common.Common.GetExcelXMLStringByDs(ds1); strInputFormat = "XML"; } } Dbconn conn = new Dbconn(strDBConnName); DataSet ds = new DataSet(); ds = conn.GetDataSetBySP(strSPName, new string[4] { "@InputFormat", "@OutputFormat", "@OutputContentType", "@ConditionStr" }, new string[4] { strInputFormat,strOutputFormat,strOutputContentType,strConditionStr}); return ds; }
/// <summary> /// Test /// </summary> /// <returns></returns> public DataSet GetData() { try { string strXML = this.m_request.Tables[0].Rows[0]["XML"].ToString(); ServerMDM_AccountQuery_GetByValues sqlServer = new ServerMDM_AccountQuery_GetByValues(); string strConn = sqlServer.GetConnectionStr("HZY_DHH", "PROD", "maweiqing", "KIJS7^x"); Dbconn conn = new Dbconn(strConn,true); DataSet ds = conn.GetDataSetBySP("WSXML_W_CLOTH_DHH_NF", new string[1] { "XML" }, new string[1] { strXML }); return ds; } catch { throw; } }
/// <summary> /// 执行SP_Create_Market_Table_New存储过程 /// </summary> /// <returns></returns> public DataSet GetData() { try { string strTableName = "GetData"; string strTableColumns = ""; string strWhere = ""; string strMainEntity = ""; DataSet returnDs = new DataSet(); if (m_request != null) { for (int i = 0; i < m_request.Tables[0].Rows.Count; i++) { strTableColumns = m_request.Tables[0].Rows[i]["Columns"].ToString(); strWhere = m_request.Tables[0].Rows[i]["Where"].ToString(); strMainEntity = m_request.Tables[i].Rows[0]["MainEntity"].ToString(); Dbconn conn = new Dbconn("MDM_Master"); string[] strParam; string[] strValue; if (m_request.Tables[0].Columns.Contains("page")) { strValue = new string[8]; strParam = new string[8]; } else { strValue = new string[5]; strParam = new string[5]; } strParam[0] = "@TableName"; strParam[1] = "@TableColumns"; strParam[2] = "@Where"; strParam[3] = "@MainEntity"; strParam[4] = "@TableType"; strValue[0] = strTableName; strValue[1] = strTableColumns; strValue[2] = strWhere; strValue[3] = strMainEntity; strValue[4] = m_TableType; if (m_request.Tables[0].Columns.Contains("page")) { strParam[5] = "@Page"; strParam[6] = "@PageRowCount"; strParam[7] = "@OrderBy"; strValue[5] = m_request.Tables[0].Rows[0]["page"].ToString(); strValue[6] = m_request.Tables[0].Rows[0]["PageRowCount"].ToString(); strValue[7] = m_request.Tables[0].Rows[0]["Order"].ToString(); } DataSet ds = new DataSet(); ds = conn.GetDataSetBySP("SP_Create_Market_Table_New", strParam, strValue); if (ds.Tables[0].Columns.Contains("STATE")) { throw new Exception("Error:" + ds.Tables[0].Rows[0]["Message"].ToString()); } //ds.Tables[0].Columns.Remove("timestamps"); //ds.Tables[0].Columns.Remove("rowIndex"); returnDs.Tables.Add(ds.Tables[0].Copy()); if (ds.Tables.Count > 1) { ds.Tables[1].TableName = "PageRowCount"; returnDs.Tables.Add(ds.Tables[1].Copy()); } } } return returnDs; } catch { throw; } }
/// <summary> /// 新建或修改申购单 /// </summary> /// <returns></returns> public DataSet SetPOApply(Dbconn conn, String strType) { DataSet ds = new DataSet(); string strActor = m_request.Tables[0].Rows[0]["actor"].ToString(); string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); string strXML1 = m_request.Tables[0].Rows[0]["XML1"].ToString(); //获取申购单主表数据 DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); String strOPType = dsXML.Tables["OPTYPE"].Rows[0][0].ToString().ToUpper(); String strID = dsXML.Tables["LIST"].Rows[0]["ID"].ToString(); String strTaskID = dsXML.Tables["LIST"].Rows[0]["TaskID"].ToString(); String strCONO = dsXML.Tables["LIST"].Rows[0]["CONO"].ToString(); String strDIVI = dsXML.Tables["LIST"].Rows[0]["DIVI"].ToString(); String strXMLC = "【操作类型,SAVE】【实体,单据保存】" + "【CONO," + strCONO + "】【DIVI," + strDIVI + "】" + "【TableXML," + strXML + "】" + "【TableXMLsub," + strXML1 + "】" + "【Type," + strType + "】【Actor," + strActor + "】【ID," + strID + "】" + "【TaskID," + strTaskID + "】" + "【返回内容, id,单据号,流程id】"; ds = conn.GetDataSetBySP("API_LV.POApply", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 获取预算信息 /// </summary> /// <returns></returns> public DataSet GetYSInfo(Dbconn conn, String strType) { DataSet ds = new DataSet(); String strSQL = ""; //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); string strCONO = dsXML.Tables["LIST"].Rows[0]["CONO"].ToString(); string strDIVI = dsXML.Tables["LIST"].Rows[0]["DIVI"].ToString(); string strCenterCode = dsXML.Tables["LIST"].Rows[0]["CenterCode"].ToString(); string strDate = dsXML.Tables["LIST"].Rows[0]["Date"].ToString(); string strBillCode = dsXML.Tables["LIST"].Rows[0]["BillCode"].ToString(); String strXMLC = "【操作类型,GET】【实体, LVAPP预算查询】" + "【CONO," + strCONO + "】【DIVI," + strDIVI + "】" + "【《W》成本中心, " + strCenterCode + "】" + "【《W》查询日期," + strDate + "】" + "【《W》申购单号, " + strBillCode + "】" + "【条件内容,】" + "【返回内容,】"; ds = conn.GetDataSetBySP("[API_LV].[POApply]", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 明细关联或替换鉴定单 /// </summary> /// <returns></returns> public DataSet LinkCCAS(Dbconn conn, String strType) { DataSet ds = new DataSet(); String strSQL = ""; //获取条件值 string strActor = m_request.Tables[0].Rows[0]["actor"].ToString(); string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); string strCONO = dsXML.Tables["LIST"].Rows[0]["CONO"].ToString(); string strDIVI = dsXML.Tables["LIST"].Rows[0]["DIVI"].ToString(); String strXMLC = "【操作类型,LinkCCAS】【实体,关联鉴定单】【CONO," + strCONO + "】【DIVI," + strDIVI + "】" + "【Actor," + strActor + "】" + "【TableXML," + strXML + "】" + "【返回内容, 执行结果】"; ds = conn.GetDataSetBySP("API_LV.POApply", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 低值易耗品报销勾对 /// </summary> /// <param name="conn"></param> /// <param name="strType"></param> /// <returns></returns> public DataSet SetPOApplySubmit(Dbconn conn, String strType) { DataSet ds = new DataSet(); ; //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); String strActor = dsXML.Tables["LIST"].Rows[0]["Actor"].ToString(); string strSubmitID = dsXML.Tables["LIST"].Rows[0]["SubmitID"].ToString(); String strXMLC = "【操作类型,SAVE】【实体,报销财务勾对】【CONO,】【DIVI,】" + "【《W》操作人, " + strActor + "】" + "【《W》勾对记录, " + strSubmitID + "】" + "【条件内容,】" + "【返回内容,主表列表】"; ds = conn.GetDataSetBySP("[API_LV].[POApply]", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 获取 UNIQUE_KEY /// </summary> /// <returns></returns> public string getUniqueKey(Dbconn conn) { DataSet ds = new DataSet(); string code = ""; String strXMLC = "【操作类型,GET】【DIVI,D01】【CONO,HWA】【主分类编码,HR】【关键字,HR】"; ds = conn.GetDataSetBySP("[SRV_MDM].[BillCode]", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); if (ds.Tables != null) { code = ds.Tables[0].Rows[0]["billcode"].ToString();; } return code; }
/// <summary> /// 固定资产申购单预算校验 /// </summary> /// <returns></returns> public DataSet CheckFABudget(string strType, Dbconn conn) { DataSet ds = new DataSet(); //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); string strPOApplyCode = dsXML.Tables["LIST"].Rows[0]["POApplyCode"].ToString(); String strXMLC = "【操作类型,GET】【实体,FAAPP预算校验】【CONO,】【DIVI,】" + "【《W》申购单号," + strPOApplyCode + "】" + "【返回内容, 主表列表】"; ds = conn.GetDataSetBySP("API_FA.BudgetOfTYBZ", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
private void AddNewRow(Dbconn conn, string strbody_id, string struser_name, string struser_login_name, string struser_notuse) { string[] strParam = new string[5]; strParam[0] = "@MDMName"; strParam[1] = "@PropertyName"; strParam[2] = "@ExpressionName"; strParam[3] = "@BodyID"; strParam[4] = "@Values"; string[] strValues = new string[5]; strValues[0] = "User"; strValues[1] = "用户姓名"; strValues[2] = "CN"; strValues[3] = strbody_id; strValues[4] = struser_name; conn.GetDataSetBySP("SP_InsertValue", strParam, strValues); strValues[0] = "User"; strValues[1] = "用户所属App"; strValues[2] = "CN"; strValues[3] = strbody_id; strValues[4] = "F22"; conn.GetDataSetBySP("SP_InsertValue", strParam, strValues); strValues[0] = "User"; strValues[1] = "登录用户名"; strValues[2] = "CN"; strValues[3] = strbody_id; strValues[4] = struser_login_name; conn.GetDataSetBySP("SP_InsertValue", strParam, strValues); strValues[0] = "User"; strValues[1] = "是否停用"; strValues[2] = "CN"; strValues[3] = strbody_id; strValues[4] = struser_notuse; conn.GetDataSetBySP("SP_InsertValue", strParam, strValues); if (struser_notuse == "1") { strValues[0] = "User"; strValues[1] = "停用日期"; strValues[2] = "CN"; strValues[3] = strbody_id; strValues[4] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); conn.GetDataSetBySP("SP_InsertValue", strParam, strValues); } else { strValues[0] = "User"; strValues[1] = "停用日期"; strValues[2] = "CN"; strValues[3] = strbody_id; strValues[4] = ""; conn.GetDataSetBySP("SP_InsertValue", strParam, strValues); } }
/// <summary> /// 利润中心损益表配置 配置-修改-查询 /// </summary> /// <returns></returns> public DataSet ISRows(Dbconn conn, String strType) { DataSet ds_Return = new DataSet(); string strActor = m_request.Tables[0].Rows[0]["actor"].ToString(); string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); DataSet ds = new DataSet(); String strSQL = ""; if (strType == "UpdISRows") { DataTable dtOptypes = dsXML.Tables["OPTYPE"]; bool bResult = true; conn.BeginTransaction(); for (int i = 0; i < dtOptypes.Rows.Count; i++) { //如果包含rowindex,就循环移除 if (dsXML.Tables[i + 1].Columns.Contains("rowindex")) { dsXML.Tables[i + 1].Columns.Remove("rowindex"); } if (dtOptypes.Rows[i][0].ToString().ToUpper() == "UPDATE") { DataTable dt_List2 = dsXML.Tables[i + 1]; //添加更新主键,按照GUID更新 ArrayList ListKey = new ArrayList(); ListKey.Add("bg6_id"); bResult = conn.Update("B01_MDM.BG6_IncomeStatement", dt_List2, ListKey); } } conn.CommitTransaction(); if (bResult) { dt_EditResult.Rows.Add(new object[] { true, "保存成功!" }); } else { dt_EditResult.Rows.Add(new object[] { false, "保存失败!" }); } ds_Return.Tables.Add(dt_EditResult); return ds_Return; } else if (strType == "ISRows") { //获取条件值 string strPage = dsXML.Tables["LIST"].Rows[0]["Page"].ToString(); string strNum = dsXML.Tables["LIST"].Rows[0]["Num"].ToString(); string strCons = dsXML.Tables["LIST"].Rows[0]["Cons"].ToString(); string strOrderBy = dsXML.Tables["LIST"].Rows[0]["OrderBy"].ToString(); string[] strParam = new string[] { }; strSQL = @" SELECT * FROM B01_MDM.BG6_IncomeStatement WHERE 1=1 " + strCons; ds = conn.GetDataSetForPageList(strSQL, strParam, int.Parse(strPage), int.Parse(strNum), strOrderBy); return ds; } else if (strType == "ISRowsHZ") { //获取条件值 string strCONO = dsXML.Tables["LIST"].Rows[0]["CONO"].ToString(); string strDIVI = dsXML.Tables["LIST"].Rows[0]["DIVI"].ToString(); string strType1 = dsXML.Tables["LIST"].Rows[0]["Type"].ToString(); string strYear = dsXML.Tables["LIST"].Rows[0]["Year"].ToString(); string strBrand = dsXML.Tables["LIST"].Rows[0]["Brand"].ToString(); string strCostCenter = dsXML.Tables["LIST"].Rows[0]["CostCenter"].ToString(); string strShopType = dsXML.Tables["LIST"].Rows[0]["ShopType"].ToString(); string strDLCode = dsXML.Tables["LIST"].Rows[0]["DLCode"].ToString(); string strXLCode = dsXML.Tables["LIST"].Rows[0]["XLCode"].ToString(); string strCom = dsXML.Tables["LIST"].Rows[0]["Com"].ToString(); string strDept = dsXML.Tables["LIST"].Rows[0]["Dept"].ToString(); string strProject = dsXML.Tables["LIST"].Rows[0]["Project"].ToString(); string strState = dsXML.Tables["LIST"].Rows[0]["State"].ToString(); String strXMLC = "【操作类型,GET】【实体, 利润中心损益】" + "【CONO," + strCONO + "】【DIVI," + strDIVI + "】" + "【《W》汇总方式, " + strType1 + "】" + "【《W》年份," + strYear + "】 【《W》品牌," + strBrand + "】" + "【《W》成本中心," + strCostCenter + "】【《W》店铺类型," + strShopType + "】" + "【《W》大类编码," + strDLCode + "】【《W》小类编码," + strXLCode + "】" + "【《W》公司, " + strCom + "】" + "【《W》部门," + strDept + "】【《W》项目名称," + strProject + "】" + "【《W》状态," + strState + "】" + "【条件内容,】" + "【返回内容,】"; ds = conn.GetDataSetBySP("[API_BM].[IncomeStatement]", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; } return ds; }
/// <summary> /// 部门预算汇总(含追加) /// </summary> /// <returns></returns> public DataSet GetDeptKMGQRowsA(Dbconn conn, String strType) { DataSet ds = new DataSet(); String strSQL = ""; //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); string strCONO = dsXML.Tables["LIST"].Rows[0]["CONO"].ToString(); string strDIVI = dsXML.Tables["LIST"].Rows[0]["DIVI"].ToString(); string strType1 = dsXML.Tables["LIST"].Rows[0]["Type"].ToString(); string strYear = dsXML.Tables["LIST"].Rows[0]["Year"].ToString(); string strBrand = dsXML.Tables["LIST"].Rows[0]["Brand"].ToString(); string strDept = dsXML.Tables["LIST"].Rows[0]["Dept"].ToString(); string strProject = dsXML.Tables["LIST"].Rows[0]["Project"].ToString(); string strCostCenter = dsXML.Tables["LIST"].Rows[0]["CostCenter"].ToString(); string strDLCode = dsXML.Tables["LIST"].Rows[0]["DLCode"].ToString(); string strXLCode = dsXML.Tables["LIST"].Rows[0]["XLCode"].ToString(); string strState = dsXML.Tables["LIST"].Rows[0]["State"].ToString(); String strXMLC = "【操作类型,GET】【实体, 部门预算科目汇总】" + "【CONO," + strCONO + "】【DIVI," + strDIVI + "】" + "【《W》汇总方式, " + strType1 + "】" + "【《W》年份," + strYear + "】 【《W》品牌," + strBrand + "】" + "【《W》部门," + strDept + "】【《W》项目名称," + strProject + "】" + "【《W》成本中心," + strCostCenter + "】" + "【《W》大类编码," + strDLCode + "】【《W》小类编码," + strXLCode + "】" + "【《W》状态," + strState + "】" + "【条件内容,】" + "【返回内容,】"; ds = conn.GetDataSetBySP("[API_BM].[BudgetA]", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 加班工资计算 /// </summary> /// <returns></returns> public DataSet CalculateMoney(Dbconn conn, String strType) { DataSet ds = new DataSet(); //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); String strMID = dsXML.Tables["LIST"].Rows[0]["approveid"].ToString(); String strXMLC = "【操作类型,GET】【实体,加班金额计算】【CONO,】【DIVI,】" + "【《W》TaskID, " + strMID + "】" + "【条件内容,】" + "【返回内容,主表列表】"; ds = conn.GetDataSetBySP("[API_HR].[SysCfg]", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 加班申请汇总 /// </summary> /// <returns></returns> public DataSet GetOTHZInfo(Dbconn conn, String strType) { DataSet ds = new DataSet(); //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); String strOrgID = dsXML.Tables["LIST"].Rows[0]["orgid"].ToString(); String strMonth = dsXML.Tables["LIST"].Rows[0]["month"].ToString(); String strXMLC = "【操作类型,GET】【实体, 加班申请汇总】【CONO,】【DIVI,】" + "【《W》OrgID," + strOrgID + "】【《W》月份," + strMonth + "】" + "【返回内容, 主表列表】"; ds = conn.GetDataSetBySP("[API_HR].[SysCfg]", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 大区经理配置调整 /// </summary> /// <returns></returns> public DataSet UpdSysCfg(Dbconn conn, String strType) { DataSet ds = new DataSet(); //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); String strID = dsXML.Tables["LIST"].Rows[0]["id"].ToString(); String strUnitID = dsXML.Tables["LIST"].Rows[0]["unitid"].ToString(); String strUnitName = dsXML.Tables["LIST"].Rows[0]["unitname"].ToString(); string strPerCode = dsXML.Tables["LIST"].Rows[0]["percode"].ToString(); string strPerName = dsXML.Tables["LIST"].Rows[0]["pername"].ToString(); string strPerCode1 = dsXML.Tables["LIST"].Rows[0]["percode1"].ToString(); string strPerName1 = dsXML.Tables["LIST"].Rows[0]["pername1"].ToString(); string strActor = dsXML.Tables["LIST"].Rows[0]["actor"].ToString(); String strXMLC = "【操作类型,SET】【实体,大区经理配置】【CONO,】【DIVI,】" + "【《W》OID," + strID + "】" + "【《W》部门ID," + strUnitID + "】【《W》部门名称," + strUnitName + "】" + "【《W》员工号," + strPerCode + "】【《W》姓名," + strPerName + "】" + "【《W》员工号CS," + strPerCode1 + "】【《W》城市经理," + strPerName1 + "】" + "【《W》操作人," + strActor + "】" + "【返回内容, 主表列表】"; ds = conn.GetDataSetBySP("[API_HR].[SysCfg]", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 根据条件获取固定资产预算数据集 /// </summary> /// <returns></returns> public DataSet GetFABudgetByCons(string strType, Dbconn conn) { DataSet ds = new DataSet(); //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); string strPage = dsXML.Tables["LIST"].Rows[0]["Page"].ToString(); string strNum = dsXML.Tables["LIST"].Rows[0]["Num"].ToString(); string strCons = dsXML.Tables["LIST"].Rows[0]["Cons"].ToString(); string strOrderBy = dsXML.Tables["LIST"].Rows[0]["OrderBy"].ToString(); String strXMLC = "【操作类型,GET】【实体,预算查询】【CONO,】【DIVI,】" + "【《W》页码," + strPage + "】【《W》记录数," + strNum + "】" + "【《W》查询条件," + strCons + "】" + "【排序方式," + strOrderBy + "】" + "【返回内容, 主表列表】"; ds = conn.GetDataSetBySP("API_FA.Budget", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 保存固定资产预算数据集 /// </summary> /// <returns></returns> public DataSet SaveFABudgets(string strType, Dbconn conn) { DataSet ds = new DataSet(); //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); String strXMLC = "【操作类型,SAVE】【实体,预算保存】【CONO,】【DIVI,】" + "【TableXML," + strXML + "】" + "【返回内容, 主表列表】"; ds = conn.GetDataSetBySP("API_FA.Budget", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }
/// <summary> /// 根据条件获取待办任务数据集 条件-分页-排序等 /// </summary> /// <returns></returns> public DataSet GetWorkFlowTaskList(Dbconn conn, String strType) { DataSet ds = new DataSet(); String strSQL = ""; //获取条件值 string strXML = m_request.Tables[0].Rows[0]["XML"].ToString(); DataSet dsXML = Common.Common.GetDSByExcelXML(strXML); string strPage = dsXML.Tables["LIST"].Rows[0]["Page"].ToString(); string strNum = dsXML.Tables["LIST"].Rows[0]["Num"].ToString(); string strCons1 = dsXML.Tables["LIST"].Rows[0]["Cons1"].ToString(); string strCons2 = dsXML.Tables["LIST"].Rows[0]["Cons2"].ToString(); string strCons3 = dsXML.Tables["LIST"].Rows[0]["Cons3"].ToString(); string strOrderBy = dsXML.Tables["LIST"].Rows[0]["OrderBy"].ToString(); String strXMLC = "【操作类型,GET】【实体,任务查询】【CONO,】【DIVI,】" + "【《W》页码," + strPage + "】【《W》记录数," + strNum + "】" + "【《W》查询条件1," + strCons1 + "】" + "【《W》查询条件2," + strCons2 + "】" + "【《W》查询条件3," + strCons3 + "】" + "【排序方式," + strOrderBy + "】" + "【Type," + strType + "】" + "【返回内容, 任务列表】"; ds = conn.GetDataSetBySP("SRV_BPM.WorkFlowTask_APP", new string[4] { "@InputFormat", "@OutputFormat" , "@OutputContentType", "@ConditionStr" } , new string[4] { "AML", "DB", "RS", strXMLC }); return ds; }