public static string GetConfig(Company oCompany, string config) { if (YLConfig.ContainsKey(config)) { return(YLConfig[config]); } else { var configValue = new RecordsetWapper(oCompany, $"SELECT U_Value FROM [@YL_Config] WHERE Code='{config}'").GetScalarValue().ToString(); YLConfig.Add(config, configValue); return(configValue); } }
public bool Verifly() { RecordsetWapper wapper = new RecordsetWapper(this.MyCompany, "EXEC [YL_SP_VeryfiyApprovalData]'17','" + this.BaseKey + "','',''"); DataTable dataTable = wapper.GetDataTable(); string s = wapper.GetScalarValue(0).ToString(); string message = wapper.GetScalarValue(1).ToString(); string str3 = wapper.GetScalarValue(2).ToString(); if (int.Parse(s) > 0) { throw new Exception(message); } this.ApprovalCode = str3; return true; }
public virtual bool Verifly() { var isTriggerApproval = this.IsTriggerApproval ? "Y" : "N"; RecordsetWapper wapper = new RecordsetWapper(this.MyCompany, $"EXEC [YL_SP_VeryfiyApprovalData],'{this.ObjType}' ,'{this.DocEntry}','{isTriggerApproval}','','' "); DataTable dataTable = wapper.GetDataTable(); string errorCode = wapper.GetScalarValue(0).ToString(); string errorMessage = wapper.GetScalarValue(1).ToString(); string apvCode = wapper.GetScalarValue(2).ToString(); if (int.Parse(errorCode) > 0) { throw new Exception(errorMessage); } this.ApprovalCode = apvCode; return(true); }