public static string ChangePass(string pv_strUserName, string pv_strPass, string pv_strNewPass) { string v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); try { XmlDocument v_objDoc = LXMLMessage.InitXmlMessageTemplate(); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.FunctionName, "BusinessServices.System.SystemController.ChangeUserPass"); DataTable v_dtParam = LXMLMessage.InitRequestParamTable(); v_dtParam.Rows.Add(new string[] { "UserName", pv_strUserName }); v_dtParam.Rows.Add(new string[] { "UserPass", LSecurity.MD5Encrypt(pv_strPass) }); v_dtParam.Rows.Add(new string[] { "NewPass", LSecurity.MD5Encrypt(pv_strNewPass) }); v_objDoc.DocumentElement.SelectSingleNode("RequestInfo").InnerXml = "<![CDATA[" + LXMLMessage.ConvertDataTableToXml(v_dtParam) + "]]>"; string v_strDocument = LXMLMessage.ConvertDocumentToString(v_objDoc); v_strRet = WebProcess.Instance().SendMessage(v_strDocument); } catch (Exception ex) { v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); } return(v_strRet); }
public static DataTable GetTreeDonVi(string pv_strUserName, string pv_strMaDonVi) { DataTable v_dt = null; string v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); XmlDocument v_objDoc = LXMLMessage.InitXmlMessageTemplate(); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.FunctionName, "BusinessServices.TruyVan.BS_TruyVan.TruyVanXML"); DataTable v_dtParam = LXMLMessage.InitRequestParamTable(); v_dtParam.Rows.Add(new string[] { "OBJECTNAME", "INQ.DS.CUM" }); v_dtParam.Rows.Add(new string[] { "INQUIRYNAME", "TREE_01" }); v_dtParam.Rows.Add(new string[] { "USER_NAME", pv_strUserName }); v_dtParam.Rows.Add(new string[] { "MA_DVI_QLY", pv_strMaDonVi }); try { v_objDoc.DocumentElement.SelectSingleNode("RequestInfo").InnerXml = "<![CDATA[" + LXMLMessage.ConvertDataTableToXml(v_dtParam) + "]]>"; string v_strDocument = LXMLMessage.ConvertDocumentToString(v_objDoc); v_strRet = WebProcess.Instance().SendMessage(v_strDocument); } catch (Exception ex) { v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); } if (v_strRet.StartsWith("OK|")) { v_dt = LXMLMessage.ConvertXmlToDataTable(v_strRet.Substring(3)); } return(v_dt); }
public static string LoginRequest(string pv_strUserName, string pv_strPass, ref string SessionId) { string v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); try { XmlDocument v_objDoc = LXMLMessage.InitXmlMessageTemplate(); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.FunctionName, "BusinessServices.System.SystemController.LoginUser"); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.Module, DatabaseConstant.Module.QTHT.getValue()); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.Function, DatabaseConstant.Function.HT_LOGIN.getValue()); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.Action, DatabaseConstant.Action.DANG_NHAP.getValue()); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.UserName, pv_strUserName); DataTable v_dtParam = LXMLMessage.InitRequestParamTable(); v_dtParam.Rows.Add(new string[] { "UserName", pv_strUserName }); v_dtParam.Rows.Add(new string[] { "UserPass", pv_strPass }); v_objDoc.DocumentElement.SelectSingleNode("RequestInfo").InnerXml = "<![CDATA[" + LXMLMessage.ConvertDataTableToXml(v_dtParam) + "]]>"; string v_strDocument = LXMLMessage.ConvertDocumentToString(v_objDoc); v_strRet = WebProcess.Instance().SendRequest(v_strDocument, ref SessionId); } catch (Exception ex) { v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); } return(v_strRet); }
public static string GetCumByID(int pv_ICumID) { string v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); XmlDocument v_objDoc = LXMLMessage.InitXmlMessageTemplate(); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.FunctionName, "BusinessServices.DanhMuc.BS_DM_CUM.ProcessXML"); DataTable v_dtParam = LXMLMessage.InitRequestParamTable(); v_dtParam.Rows.Add(new string[] { "FUNCTIONNAME", "getByID" }); v_dtParam.Rows.Add(new string[] { "ID", pv_ICumID.ToString() }); try { v_objDoc.DocumentElement.SelectSingleNode("RequestInfo").InnerXml = "<![CDATA[" + LXMLMessage.ConvertDataTableToXml(v_dtParam) + "]]>"; string v_strDocument = LXMLMessage.ConvertDocumentToString(v_objDoc); v_strRet = WebProcess.Instance().SendMessage(v_strDocument); } catch (Exception ex) { v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); } if (v_strRet.StartsWith("OK|")) { v_strRet = v_strRet.Substring(3); } return(v_strRet); }
public static DataTable GetDSBaoCao(string pv_strMaDM) { DataTable v_dt = null; string v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); XmlDocument v_objDoc = LXMLMessage.InitXmlMessageTemplate(); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.FunctionName, "BusinessServices.BaoCao.BS_BaoCao.ProcessXML"); DataTable v_dtParam = LXMLMessage.InitRequestParamTable(); v_dtParam.Rows.Add(new string[] { "FUNCTIONNAME", "GetDSBaoCao" }); v_dtParam.Rows.Add(new string[] { "MADM", pv_strMaDM }); try { v_objDoc.DocumentElement.SelectSingleNode("RequestInfo").InnerXml = "<![CDATA[" + LXMLMessage.ConvertDataTableToXml(v_dtParam) + "]]>"; string v_strDocument = LXMLMessage.ConvertDocumentToString(v_objDoc); v_strRet = WebProcess.Instance().SendMessage(v_strDocument); } catch (Exception ex) { v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); } if (v_strRet.StartsWith("OK|")) { v_dt = LXMLMessage.ConvertXmlToDataTable(v_strRet.Substring(3)); } return(v_dt); }
public static long LuuTTCum(string[] pv_arrTTCum) { long v_lngError = ErrorDef.SYSTEM_SUCESS; string v_strRet = ""; XmlDocument v_objDoc = LXMLMessage.InitXmlMessageTemplate(); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.FunctionName, "BusinessServices.DanhMuc.BS_DM_CUM.ProcessXML"); DataTable v_dtParam = LXMLMessage.InitRequestParamTable(); v_dtParam.Rows.Add(new string[] { "FUNCTIONNAME", "LuuTTCum" }); try { if (pv_arrTTCum.GetLength(0) > 0) { for (int i = 0; i < pv_arrTTCum.GetLength(0); i++) { DataRow v_dr = v_dtParam.NewRow(); } } v_objDoc.DocumentElement.SelectSingleNode("RequestInfo").InnerXml = "<![CDATA[" + LXMLMessage.ConvertDataTableToXml(v_dtParam) + "]]>"; string v_strDocument = LXMLMessage.ConvertDocumentToString(v_objDoc); v_strRet = WebProcess.Instance().SendMessage(v_strDocument); } catch (Exception ex) { v_lngError = ErrorDef.SYSTEM_ERROR; } return(v_lngError); }
public static DataTable GetPopupData(string pv_strMaTruyVan, List <string> pv_lstDieuKien) { DataTable v_dtRet = null; string v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); XmlDocument v_objDoc = LXMLMessage.InitXmlMessageTemplate(); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.FunctionName, "BusinessServices.Popup.BS_Popup.ProcessXML"); DataTable v_dtParam = LXMLMessage.InitRequestParamTable(); v_dtParam.Rows.Add(new string[] { "FUNCTIONNAME", "Popup" }); v_dtParam.Rows.Add(new string[] { "MATRUYVAN", pv_strMaTruyVan }); try { if (null != pv_lstDieuKien) { foreach (string v_strItem in pv_lstDieuKien) { v_dtParam.Rows.Add(new string[] { "DIEUKIEN", v_strItem }); } } v_objDoc.DocumentElement.SelectSingleNode("RequestInfo").InnerXml = "<![CDATA[" + LXMLMessage.ConvertDataTableToXml(v_dtParam) + "]]>"; string v_strDocument = LXMLMessage.ConvertDocumentToString(v_objDoc); v_strRet = WebProcess.Instance().SendMessage(v_strDocument); } catch (Exception ex) { v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); } if (v_strRet.StartsWith("OK|")) { v_objDoc.LoadXml("<root>" + v_strRet.Substring(3) + "</root>"); v_dtRet = LXMLMessage.ConvertXmlToDataTable(v_objDoc.DocumentElement.SelectSingleNode("PopupData").InnerXml); DataRow v_dr = v_dtRet.NewRow(); string[] v_arrHeader = v_objDoc.DocumentElement.SelectSingleNode("PopupHeader").InnerXml.Split("#".ToCharArray()); for (int i = 0; i < v_arrHeader.GetLength(0); i++) { string[] v_arrCol = v_arrHeader[i].Split('|'); v_dtRet.Columns[i].Caption = v_arrCol[0]; v_dtRet.Columns[i].ExtendedProperties.Add("width", v_arrCol[1]); } } return(v_dtRet); }
public static DataTable GetComboSource(string pv_strMaTruyVan, List <String> pv_lstDieuKien) { DataTable v_dtRet = null; string v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); XmlDocument v_objDoc = LXMLMessage.InitXmlMessageTemplate(); LXMLMessage.SetAttribute(ref v_objDoc, LXMLAttribute.FunctionName, "BusinessServices.TruyVan.BS_TruyVan.TruyVanXML"); DataTable v_dtParam = LXMLMessage.InitRequestParamTable(); v_dtParam.Rows.Add(new string[] { "OBJECTNAME", "INQ.COMBOBOX" }); v_dtParam.Rows.Add(new string[] { "INQUIRYNAME", pv_strMaTruyVan }); try { if (null != pv_lstDieuKien) { for (int i = 0; i < pv_lstDieuKien.Count; i++) { v_dtParam.Rows.Add(new string[] { pv_lstDieuKien[i], pv_lstDieuKien[i] }); } } v_objDoc.DocumentElement.SelectSingleNode("RequestInfo").InnerXml = "<![CDATA[" + LXMLMessage.ConvertDataTableToXml(v_dtParam) + "]]>"; string v_strDocument = LXMLMessage.ConvertDocumentToString(v_objDoc); v_strRet = WebProcess.Instance().SendMessage(v_strDocument); } catch (Exception ex) { v_strRet = "ERROR|" + ErrorDef.SYSTEM_ERROR.ToString(); } if (v_strRet.StartsWith("OK|")) { v_dtRet = LXMLMessage.ConvertXmlToDataTable(v_strRet.Substring(3)); } return(v_dtRet); }