public void GetAllTestimonials() { var proxy = new BusinessProxy(); lstvwTestimonials.DataSource = proxy.GetAllTestimonials(); lstvwTestimonials.DataBind(); }
public void GetAllNewsReleases() { var proxy = new BusinessProxy(); lstvwNewsReleases.DataSource = proxy.GetAllNewsReleases(); lstvwNewsReleases.DataBind(); }
public override void CellChanged(UFIDA.U8.UAP.UI.Runtime.Common.CellChangeEventArgs para, BusinessProxy businessObject, VoucherProxy voucherObject) { base.CellChanged(para, businessObject, voucherObject); if (para.ColumnName == "cBudgetItemID") { Business business = voucherObject.Businesses["27d9db0f-1099-4e02-a070-45fa6b11db89"]; string currentPKValue = business.PrimaryKey; if (!string.IsNullOrEmpty(currentPKValue)) { if (para.NewHiddenValue == null && string.IsNullOrEmpty(para.NewHiddenValue.ToString())) { business.Rows[currentPKValue].Cells["cPayToken"].Value = (""); } else { VoucherSrv voucherSrv = new VoucherSrv(); string text = "select cToken from BG_V_ItemToken where cItemCode='" + para.NewHiddenValue.ToString() + "'"; DataSet dataSet = voucherSrv.ExcuteSqlInData(text); if (dataSet != null && dataSet.Tables != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0) { DataRow dataRow = dataSet.Tables[0].Rows[0]; business.Rows[currentPKValue].Cells["cPayToken"].Value = dataRow["cToken"] == null ? "" : dataRow["cToken"].ToString(); } } } } }
protected void btnCreate_Click(object sender, EventArgs e) { string strAuthor = txtAuthor.Text.Trim(); string strPositionOfAuthor = txtPositionOfAuthor.Text.Trim(); string strCompany = txtCompany.Text.Trim(); string strQuote = txtQuote.Text.Trim(); string strRank = txtRank.Text.Trim(); DateTime dtDatePublished = cldrPublished.SelectedDate; bool boolIsActive = chkIsActive.Checked; Guid createdBy = Guid.NewGuid(); var proxy = new BusinessProxy(); if (Id != null) { EntityPressReleaseQuotes pressReleaseQuote = proxy.GetPressReleaseQuote(Id); proxy.UpdatePressReleaseQuote(pressReleaseQuote.Id.ToString(), strAuthor, strPositionOfAuthor, strQuote, strRank, dtDatePublished, boolIsActive, strCompany); } else { proxy.CreatePressReleaseQuote(strAuthor, strPositionOfAuthor, strQuote, strRank, dtDatePublished, boolIsActive, createdBy, strCompany); } /* * txtAuthor.Text = ""; * txtPositionOfAuthor.Text = ""; * txtQuote.Text = ""; * txtRank.Text = ""; * chkIsActive.Checked = true;*/ Response.Redirect("press-release-quotes.aspx"); }
public void ProcessRequest(HttpContext context) { string ID = context.Request.QueryString["id"]; string Type = context.Request.QueryString["type"]; string PageNo = context.Request.QueryString["page"]; if (PageNo == null) { PageNo = "No page number passed"; } string message = string.Format("Admin ImageHandler.ashx ProcessRequest() Parameters = ID: {0}, Type: {1}, PageNo: {2}", ID, Type, PageNo); Log.Info(message); try { var proxy = new BusinessProxy(); byte[] ImageData = proxy.GetImage(ID, Type, PageNo); context.Response.ContentType = "image/jpg"; context.Response.OutputStream.Write(ImageData, 0, ImageData.Length); } catch (Exception ex) { Log.Error("Admin ImageHandler.ashx ProcessRequest()", ex); } }
protected void lnkCreatePdf_Click(object sender, EventArgs e) { int[] paObjectIdList = new int[] { }; int[] mockupObjectIdList = new int[] { }; var proxy = new BusinessProxy(); if (hdnPaObjectIds.Value != "") { paObjectIdList = Array.ConvertAll(hdnPaObjectIds.Value.Split(','), s => int.Parse(s)); } if (hdnMockupObjectIds.Value != "") { mockupObjectIdList = Array.ConvertAll(hdnMockupObjectIds.Value.Split(','), s => int.Parse(s)); } byte[] pdfByteArray = proxy.GetPAObjectDetailsForPdfByList(paObjectIdList, mockupObjectIdList); string fileName = "PAObjects" + "_" + DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + ".pdf"; Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName); Response.ContentType = "application/pdf"; MemoryStream stream = new MemoryStream(pdfByteArray); Response.Buffer = true; stream.WriteTo(Response.OutputStream); Response.End(); Response.Flush(); }
protected void btnCreate_Click(object sender, EventArgs e) { string strClient = drpClient.SelectedValue; string strAuthor = txtAuthor.Text.Trim(); string strPositionOfAuthor = txtPositionOfAuthor.Text.Trim(); string strTestimonialDescription = txtTestimonial.Text.Trim(); string strRank = txtRank.Text.Trim(); DateTime dtDatePublished = cldrPublished.SelectedDate; bool boolIsActive = chkIsActive.Checked; Guid createdBy = Guid.NewGuid(); bool boolIsShownOnHomePage = chkIsShownOnHomePage.Checked; var proxy = new BusinessProxy(); if (Id != null) { EntityTestimonial testimonial = proxy.GetTestimonial(Id); proxy.UpdateTestimonial(testimonial.Id.ToString(), strClient, strAuthor, strPositionOfAuthor, strTestimonialDescription, strRank, dtDatePublished, boolIsActive, boolIsShownOnHomePage); } else { proxy.CreateTestimonial(strClient, strAuthor, strPositionOfAuthor, strTestimonialDescription, strRank, dtDatePublished, boolIsActive, createdBy, boolIsShownOnHomePage); } /* * drpClient.SelectedIndex = 0; * txtAuthor.Text = ""; * txtPositionOfAuthor.Text = ""; * txtTestimonial.Text = ""; * txtRank.Text = ""; * chkIsActive.Checked = true;*/ Response.Redirect("testimonials.aspx"); }
public void ProcessRequest(HttpContext context) { BusinessProxy proxy = new BusinessProxy(); string Id = HttpContext.Current.Request.Params["id"]; string type = HttpContext.Current.Request.Params["type"]; byte[] rtnValue = proxy.DownLoadFile(Id, type); string fileName = string.Empty; if (type == "s") { fileName = "Sample_Report_" + Id + ".ppt"; } else { fileName = "Template_Design_" + Id + ".ppt"; } context.Response.Clear(); context.Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName); context.Response.ContentType = "application/ppt"; MemoryStream stream = new MemoryStream(rtnValue); context.Response.Buffer = true; stream.WriteTo(context.Response.OutputStream); context.Response.End(); context.Response.Flush(); }
public override void CellChanged(UFIDA.U8.UAP.UI.Runtime.Common.CellChangeEventArgs para, BusinessProxy businessObject, VoucherProxy voucherObject) { base.CellChanged(para, businessObject, voucherObject); if (para.ColumnName == "cName") { } }
public void GetFirstTemplateDesignsForPreView() { string rtnVal = string.Empty; var proxy = new BusinessProxy(); try { rtnVal = proxy.GetAllTemplateDesignsForPreView(); JArray templateObjects = JArray.Parse(rtnVal); if (templateObjects.Count > 0) { DateTime date = DateTime.Parse(templateObjects[0]["UploadedDate"].ToString()); string newDate = String.Format("{0:yyyyMMddHHmmss}", date); //DesignsPreView.InnerHtml = "<a href='#' class='ViewLibraryTemplates' Index='1' Id='" + templateObjects[0]["ID"].ToString() + "'><img class='urlImageSmall' src='ImageHandler.ashx?id=" + templateObjects[0]["ID"].ToString() + "&type=t_t&date=" + newDate + "&uniqueindex=0' width='140' height='90' border='0' style='float: left;' /></a>"; DesignsPreView.InnerHtml = "<a href='#' class='ViewLibraryTemplates' Index='1' Id='" + templateObjects[0]["ID"].ToString() + "'><img alt='Samples of PowerPoint® investment performance reports created with Assette cloud-based application.' class='urlImageSmall' src='images/pitchbook-examples.png' width='140' height='90' border='0' style='float: left;' /></a>"; } } catch (Exception ex) { Log.Error(ex); } }
public void GetUserActivityCookieData() { var proxy = new BusinessProxy(); Guid userId; string cookieName = System.Configuration.ConfigurationManager.AppSettings["UserActivityCookieName"]; HttpCookie myCookie = new HttpCookie(cookieName); myCookie = HttpContext.Current.Request.Cookies[cookieName]; if (myCookie != null && myCookie.Value != "undefined") { HttpCookie cookie = Request.Cookies[cookieName]; userId = Guid.Parse(Server.HtmlEncode(cookie.Value)); } else { userId = Guid.NewGuid(); HttpCookie cookie = new HttpCookie(cookieName); cookie.Value = userId.ToString(); cookie.Expires = DateTime.MaxValue; Response.Cookies.Add(cookie); } int pageId = int.Parse(proxy.GetPageUrlId(HttpContext.Current.Request.Url.AbsolutePath)); proxy.CreateUserActivity(userId, pageId); }
public void GetAllCaseStudies() { var proxy = new BusinessProxy(); lstvwCaseStudies.DataSource = proxy.GetAllActiveCaseStudies(); lstvwCaseStudies.DataBind(); }
public void GetLatestBlogEntry() { var proxy = new BusinessProxy(); lstvwBlogEntry.DataSource = proxy.GetLatestBlogEntry(); lstvwBlogEntry.DataBind(); }
public void GetAllPressReleases() { var proxy = new BusinessProxy(); lstvwPressReleases.DataSource = proxy.GetAllActivePressReleases(); lstvwPressReleases.DataBind(); }
public void GetRandomTestimonials() { var proxy = new BusinessProxy(); lstvwQuotes.DataSource = proxy.GetRandomTestimonials(); lstvwQuotes.DataBind(); }
public void GetRandomPressReleaseQuotes() { var proxy = new BusinessProxy(); lstvwPressReleaseQuotes.DataSource = proxy.GetRandomPressReleaseQuotes(); lstvwPressReleaseQuotes.DataBind(); }
public void GetAllClients() { var proxy = new BusinessProxy(); lstvwClients.DataSource = proxy.GetAllClients(); lstvwClients.DataBind(); }
protected void btnCreate_Click(object sender, EventArgs e) { string strName = txtClient.Text.Trim(); string strAum = txtAum.Text.Trim(); string strWebUrl = txtWebUrl.Text.Trim(); string strLogoUrl = txtLogo.Text.Trim(); string strRank = txtRank.Text.Trim(); bool boolIsActive = chkIsActive.Checked; Guid createdBy = Guid.NewGuid(); var proxy = new BusinessProxy(); if (Id != null) { EntityClient client = proxy.GetClient(Id); proxy.UpdateClient(client.Id.ToString(), strName, strAum, strWebUrl, strLogoUrl, strRank, boolIsActive); } else { proxy.CreateClient(strName, strAum, strWebUrl, strLogoUrl, strRank, boolIsActive, createdBy); } /* * txtClient.Text = ""; * txtAum.Text = ""; * txtWebUrl.Text = ""; * txtLogo.Text = ""; * txtRank.Text = ""; * chkIsActive.Checked = true;*/ Response.Redirect("clients.aspx"); }
protected void btnCreate_Click(object sender, EventArgs e) { string strTitle = txtTitle.Text.Trim(); string strDescription = txtDescription.Text.Trim(); string strNewsReleaseUrl = txtNewsReleaseUrl.Text.Trim(); DateTime dtDatePublished = cldrPublished.SelectedDate; bool boolIsActive = chkIsActive.Checked; bool boolIsSecure = chkIsSecure.Checked; Guid createdBy = Guid.NewGuid(); var proxy = new BusinessProxy(); if (Id != null) { EntityNewsReleases newsRelease = proxy.GetNewsRelease(Id); proxy.UpdateNewsRelease(newsRelease.Id.ToString(), strTitle, strDescription, strNewsReleaseUrl, dtDatePublished, boolIsActive, boolIsSecure); } else { proxy.CreateNewsRelease(strTitle, strDescription, strNewsReleaseUrl, dtDatePublished, boolIsActive, boolIsSecure, createdBy); } /* * txtTitle.Text = ""; * txtDescription.Text = ""; * txtNewsReleaseUrl.Text = ""; * chkIsActive.Checked = true;*/ Response.Redirect("news-releases.aspx"); }
public void GetTopRandomTestimonial() { var proxy = new BusinessProxy(); lstvwTestiminial.DataSource = proxy.GetTopRandomTestimonial(); lstvwTestiminial.DataBind(); }
public static string CreateNewUser(string firstName, string lastName, string jobTitle, string email, string company, string title, string frimAum, string firmType) { string rtnVal = string.Empty; var proxy = new BusinessProxy(); try { //GenerateJqueryErrorForTesting(); string emailExistenceRtnVal = proxy.CheckEmailExistence(email); if (emailExistenceRtnVal != "1") { rtnVal = proxy.CreateUser(firstName, lastName, jobTitle, email, company, GetIPAddress(), title, frimAum, firmType); } else { // user already exists. login straight away! - no need to add the record rtnVal = "1"; } } catch (Exception ex) { Log.Error(ex); } return(rtnVal); }
public void GetFirstSampleReportsForPreview() { string rtnVal = string.Empty; var proxy = new BusinessProxy(); try { rtnVal = proxy.GetAllSampleReportsForPreview(); JArray sampleObjects = JArray.Parse(rtnVal); if (sampleObjects.Count > 0) { DateTime date = DateTime.Parse(sampleObjects[0]["UploadedDate"].ToString()); string newDate = String.Format("{0:yyyyMMddHHmmss}", date); //SamplesPreView.InnerHtml = "<a href='#' class='ViewLibrarySamples' Index='1' Id='" + sampleObjects[0]["ID"].ToString() + "'><img class='PreviewImage urlImageSmall' src='ImageHandler.ashx?id=" + sampleObjects[0]["ID"].ToString() + "&type=s_t&date=" + newDate + "&uniqueindex=0' width='140' height='90' border='0' style='float: left;padding:4px 2px' /></a>"; SamplesPreView.InnerHtml = "<a href='#' class='ViewLibrarySamples' Index='1' Id='" + sampleObjects[0]["ID"].ToString() + "'><img alt='Samples of PowerPoint® pitch books created for investment management firms using Assette cloud-based application.' class='PreviewImage urlImageSmall' src='images/Investment-management-pitch-book-examples.png' width='272' height='200' border='0' style='float: left; padding: 4px 0px' /></a>"; } } catch (Exception ex) { Log.Error(ex); } }
public void DeleteCaseStudy(string Id) { var proxy = new BusinessProxy(); proxy.DeleteCaseStudy(Id); GetAllCaseStudies(); }
public void DeleteTestimonial(string Id) { var proxy = new BusinessProxy(); proxy.DeleteTestimonial(Id); GetAllTestimonials(); }
public void DeletePressRelease(string Id) { var proxy = new BusinessProxy(); proxy.DeletePressRelease(Id); GetAllPressReleases(); }
public void DeleteClient(string Id) { var proxy = new BusinessProxy(); proxy.DeleteClient(Id); GetAllClients(); }
protected void Application_Error(object sender, EventArgs e) { BusinessProxy proxy = new BusinessProxy(); // logging - log4net ///////////////////////////////////////////////////////////////////////////////////////// Exception ex = Server.GetLastError().GetBaseException(); if (ex is System.Web.HttpException) { var filePath = Context.Request.FilePath; var url = ((HttpApplication)sender).Context.Request.Url; Log.Error("Application Error --> URL: " + url + "; FilePath: " + filePath, ex); } else { Log.Error("Application Error -->", ex); } // logging - event log ///////////////////////////////////////////////////////////////////////////////////////// string errorDescription = Server.GetLastError().ToString(); // logging on EventLog if (System.Configuration.ConfigurationManager.AppSettings["WriteToEventLog"].ToString() == "1") { string eventLogName = "AssetteReportsGallery"; if (!EventLog.SourceExists(eventLogName)) { EventLog.CreateEventSource(eventLogName, eventLogName); } EventLog eventLog = new EventLog(); eventLog.Source = eventLogName; eventLog.WriteEntry(errorDescription, EventLogEntryType.Error); } // add error to cache if (System.Configuration.ConfigurationManager.AppSettings["WriteToErrorPage"].ToString() == "1") { HttpContext.Current.Cache["Error"] = errorDescription; } // clear error ///////////////////////////////////////////////////////////////////////////////////////// Context.ClearError(); // re-direct to error page string fullOrigionalPath = Request.Url.ToString(); if (fullOrigionalPath.ToLower().Contains("admin")) { Response.Redirect("/error.aspx"); } else { Response.Redirect("error.aspx"); } }
public void FillClientList() { var proxy = new BusinessProxy(); drpClient.DataSource = proxy.GetAllClients(); drpClient.DataTextField = "Name"; drpClient.DataValueField = "Id"; drpClient.DataBind(); }
public void GetAllClients() { var proxy = new BusinessProxy(); lstvwClients.DataSource = proxy.GetAllClientDetailsRandom(); lstvwClients.DataBind(); lstvwClientsScroll.DataSource = proxy.GetAllClientDetailsRandomScroll(); lstvwClientsScroll.DataBind(); }
public override void CellDoubleClick(CellDoubleClickEventArgs para, BusinessProxy businessObject, VoucherProxy voucherObject) { businessObject.Rows[para.RowKey].Cells[para.ColumnName].Value = "1111"; //businessObject.SetCellsStyle() //businessObject.Cells[para.ColumnName].Value = "CellDoubleClick"; //voucherObject.RefreshView(); }
void context_AcquireRequestState(object sender, EventArgs e) { try { HttpApplication application = (HttpApplication)sender; HttpContext context = application.Context; string emailExists = string.Empty; string cookieName = System.Configuration.ConfigurationManager.AppSettings["CookieName"]; HttpCookie myCookie = new HttpCookie(cookieName); myCookie = HttpContext.Current.Request.Cookies[cookieName]; if (myCookie != null && myCookie.Value != "undefined") { // string email = Server.UrlDecode(); string email = Uri.UnescapeDataString(myCookie.Value); var proxy = new BusinessProxy(); emailExists = proxy.CheckEmailExistence(email); if (emailExists == "1") { string jsonEntUser = proxy.GetUserDetailsByEmail(email); JArray userObjects = JArray.Parse(jsonEntUser); foreach (var userObject in userObjects) { if (HttpContext.Current.Session != null) { HttpContext.Current.Session["UserId"] = userObject["Id"].ToString(); HttpContext.Current.Session["Email"] = userObject["Email"].ToString(); HttpContext.Current.Session["Name"] = userObject["FirstName"].ToString(); break; } } // exception: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack // to overcome add, make add response 'false' //HttpContext.Current.Response.Redirect("client-welcome.aspx", false); } else { HttpContext.Current.Response.Redirect("login.aspx", false); } } } catch (Exception ex) { Log.Error(ex); } }
public void GetPressRelease(string Id) { var proxy = new BusinessProxy(); EntityPressReleases pressRelease = proxy.GetPressRelease(Id); txtTitle.Text = pressRelease.Title; txtDescription.Text = pressRelease.Description; txtPressReleaseUrl.Text = pressRelease.PressReleaseFileURL; cldrPublished.SelectedDate = pressRelease.DatePublished; chkIsActive.Checked = pressRelease.IsActive; }
private void CalcBody_Tax_LWOTH(BusinessProxy businessObject, VoucherProxy voucherObject) { //Business body = voucherObject.Businesses["a701a36d-ec4f-43c9-b95a-ef77d7600f57"]; Business head = voucherObject.Businesses["12f73210-161b-4d45-94a0-6589e1ec7ae2"]; //15.6.25 劳务费外外聘时需要 表体根据报销金额,算税。 string exid = businessObject.Cells["ExpenserID"].Value; string voucherid = head.Cells["ID"].Value; string amount = businessObject.Cells["ExpenseMoney"].Value; string cNeDefine13 = businessObject.Cells["cNeDefine13"].Value; if (!string.IsNullOrEmpty(exid) && !string.IsNullOrEmpty(amount) && !string.IsNullOrEmpty(cNeDefine13)) { VoucherSrv voucherSrv = new VoucherSrv(); string text = "exec P_SW_NE_CalcTax '" + exid + "','" + voucherid + "','" + amount + "','" + cNeDefine13 + "'"; DataSet dataSet = voucherSrv.ExcuteSqlInData(text); if (dataSet != null && dataSet.Tables != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0) { DataRow dataRow = dataSet.Tables[0].Rows[0]; businessObject.Cells["cNeDefine22"].Value = dataRow[0].ToString(); //税额 decimal damount = 0, dtax = 0,dpay = 0; decimal.TryParse(amount, out damount); decimal.TryParse(dataRow[0].ToString(), out dtax); dpay = damount - dtax; dpay = Math.Round(dpay, 2); businessObject.Cells["cNeDefine23"].Value = dpay.ToString("0.00"); //实发金额 } } }
private void CalcBody_RefTypeVID(UFIDA.U8.UAP.UI.Runtime.Common.CellChangeEventArgs para, BusinessProxy businessObject, VoucherProxy voucherObject) { //15.6.25表体报销人带其它 信息。 string exid = null; if (para.NewHiddenValue != null) exid = para.NewHiddenValue.ToString(); CalcBody_RefTypeVID(exid, businessObject, voucherObject); }
private void CalcBody_RefTypeVID(string exposerID, BusinessProxy businessObject, VoucherProxy voucherObject) { return;//身份证号手动录入不自动带了 //15.6.25表体报销人带其它 信息。 string exid = exposerID; if (!string.IsNullOrEmpty(exid)) { VoucherSrv voucherSrv = new VoucherSrv(); string text = "select vIDNo,rPersonType,vsimpleName from hr_hi_Person p left join hr_ct000 c on p.rPersonType=c.ccodeID where cpsn_num='" + exid + "'"; DataSet dataSet = voucherSrv.ExcuteSqlInData(text); if (dataSet != null && dataSet.Tables != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0) { DataRow dataRow = dataSet.Tables[0].Rows[0]; //businessObject.Cells["cNeDefine12"].Value = dataRow["vsimpleName"].ToString(); //人员类别 15.7.15 改成姓名了。 businessObject.Cells["cNeDefine13"].Value = dataRow["vIDNo"].ToString(); //身份证 } } else { //businessObject.Cells["cNeDefine12"].Value = null; //人员类别 businessObject.Cells["cNeDefine13"].Value = null; //身份证 } }
private void CalcBody_ReCalcBXAmount(UFIDA.U8.UAP.UI.Runtime.Common.CellChangeEventArgs para, BusinessProxy businessObject, VoucherProxy voucherObject) { string value = businessObject.Cells["cNeDefine11"].Value; if (string.IsNullOrEmpty(value)) return; string newValue = para.NewValue; if (newValue != "") { double num = 0.0; double.TryParse(newValue, out num); if (num > 0.0) { string value2 = businessObject.Cells["cNeDefine21"].Value; double num2 = 0.0; double.TryParse(value2, out num2); if (num > num2) { businessObject.Cells["ExpenseMoney"].Value = (value2); businessObject.Cells["LocalMoney"].Value = (value2); this.CalcHead_Money(voucherObject); } } } }
private void queryICBC(BusinessProxy businessObject, VoucherProxy voucherObject) { //queryICBC_QueryEnd(null, null); //return; UAPDebug.WriteLine("", this, System.Reflection.MethodBase.GetCurrentMethod(), "公务卡-开始查询"); string exposerID = businessObject.Cells["ExpenserID"].Value; if (string.IsNullOrEmpty(exposerID)) { UAPDebug.WriteLine("", this, System.Reflection.MethodBase.GetCurrentMethod(), "公务卡-报销人为空"); return; } string date = businessObject.Cells[gwc_traceDateField].Value; string amountS = businessObject.Cells["ExpenseMoney"].Value; string card = null; string name = null; if (string.IsNullOrEmpty(date) || string.IsNullOrEmpty(amountS)) { UAPDebug.WriteLine("", this, System.Reflection.MethodBase.GetCurrentMethod(), "公务卡-日期或金额为空"); return; } float famount = 0f; float.TryParse(amountS, out famount); if (famount < 0.001) { UAPDebug.WriteLine("", this, System.Reflection.MethodBase.GetCurrentMethod(), "公务卡-金额小于0"); return; } Int64 iamount = Convert.ToInt64(famount * 100); string amount = iamount.ToString(); VoucherSrv voucherSrv = new VoucherSrv(); string text = "select cPsn_Name,cbankaccount from hr_hi_Person j join hr_hi_bankaccount a on j.cpsn_num=a.cpsn_num where j.cpsn_num='" + exposerID + "'"; DataSet dataSet = voucherSrv.ExcuteSqlInData(text); if (dataSet != null && dataSet.Tables != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0) { DataRow dataRow = dataSet.Tables[0].Rows[0]; card = dataRow["cbankaccount"].ToString(); name = dataRow["cPsn_Name"].ToString(); } if (string.IsNullOrEmpty(card) || string.IsNullOrEmpty(name)) { UAPDebug.WriteLine("", this, System.Reflection.MethodBase.GetCurrentMethod(), "公务卡-卡号或姓名为空"); return; } UAPDebug.WriteLine("", this, System.Reflection.MethodBase.GetCurrentMethod(), "公务卡-开始准备ICBC参数,date=" + date + ",amount=" + amount + ",card=" + card + ",name=" + name); QueryICBC query = new QueryICBC("GB2312", date, null, amount, card, name); // public object businessObject { get; set; } // public object voucherObject { get; set; } query.businessObject = businessObject; query.voucherObject = voucherObject; query.QueryEnd += new EventHandler(queryICBC_QueryEnd); query.QueryError += new EventHandler(query_QueryError); //query.QueryAsyn(); query.QueryProxy(); UAPDebug.WriteLine("", this, System.Reflection.MethodBase.GetCurrentMethod(), "公务卡-调用ICBC,异步结束"); }
private void setShopName(string queryResult, BusinessProxy businessObject) { MessageBox.Show(queryResult); string shopName = ""; XDocument xDocument = XDocument.Parse(queryResult); XElement root = xDocument.Root; IEnumerable<XElement> sn = root.Descendants("ShopName"); foreach (XElement el in sn) { shopName = el.Value; } businessObject.Cells[gwc_traceShopNameField].Value = shopName; }
private void CalcBody_zzg(UFIDA.U8.UAP.UI.Runtime.Common.CellChangeEventArgs para, BusinessProxy businessObject, VoucherProxy voucherObject) { string entityID = businessObject.EntityID; if (NeExpense.config.ContainsKey(entityID)) { CheckConfig checkConfig = NeExpense.config[(entityID)]; if (checkConfig.ChangedColName == para.ColumnName) { VoucherSrv voucherSrv = new VoucherSrv(); string text = checkConfig.CheckSql.Replace("@ret", para.NewValue); DataSet dataSet = voucherSrv.ExcuteSqlInData(text); DataRow dataRow = null; if (dataSet != null && dataSet.Tables != null && dataSet.Tables[0] != null && dataSet.Tables[0].Rows.Count > 0) { dataRow = dataSet.Tables[0].Rows[0]; } if (dataRow != null) { using (Dictionary<string, string>.KeyCollection.Enumerator enumerator = checkConfig.WriteCol.Keys.GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; businessObject.Cells[current].Value = dataRow[checkConfig.WriteCol[current]].ToString(); } } } } } }
public override void CellChanged(UFIDA.U8.UAP.UI.Runtime.Common.CellChangeEventArgs para, BusinessProxy businessObject, VoucherProxy voucherObject) { base.CellChanged(para, businessObject, voucherObject); if (NeExpense.config == null) { NeExpense.config = CheckConfig.Init(); } if (businessObject.EntityID == "a701a36d-ec4f-43c9-b95a-ef77d7600f57") //表体 { if (para.ColumnName == "ExpenseMoney") { CalcBody_ReCalcBXAmount(para, businessObject, voucherObject); if (voucherObject.Businesses["12f73210-161b-4d45-94a0-6589e1ec7ae2"].Cells["OperationTypeCode"].Value == "O") CalcBody_Tax_LWOTH(businessObject, voucherObject); //从表头报销人会自动带到表体,不触发事件,所以在金额处再补带一次。 string exposerID = businessObject.Cells["ExpenserID"].Value; //string cNeDefine12 = businessObject.Cells["cNeDefine12"].Value; if (!string.IsNullOrEmpty(exposerID))//&& string.IsNullOrEmpty(cNeDefine12)) { CalcBody_RefTypeVID(exposerID, businessObject, voucherObject); } queryICBC(businessObject, voucherObject); } else if (para.ColumnName == "ExpenserID") { CalcBody_RefTypeVID(para, businessObject, voucherObject); if (voucherObject.Businesses["12f73210-161b-4d45-94a0-6589e1ec7ae2"].Cells["OperationTypeCode"].Value == "O") { CalcBody_Tax_LWOTH(businessObject, voucherObject); } queryICBC(businessObject, voucherObject); } else if (para.ColumnName == "cNeDefine13")//手动录入身份证号,并计算税。 { if (voucherObject.Businesses["12f73210-161b-4d45-94a0-6589e1ec7ae2"].Cells["OperationTypeCode"].Value == "O") CalcBody_Tax_LWOTH(businessObject, voucherObject); } else if (para.ColumnName == gwc_traceDateField) //公务卡日期。 { queryICBC(businessObject, voucherObject); } } else if (businessObject.EntityID == "12f73210-161b-4d45-94a0-6589e1ec7ae2") //表头 { if (para.ColumnName == "cDefine13") { if (para.NewValue == "公务卡") { voucherObject.SetPortalButtonEnabled("btnSWRefConsume", true); } else if (para.OldValue == "公务卡" && para.NewValue != "公务卡") { voucherObject.Businesses["a701a36d-ec4f-43c9-b95a-ef77d7600f57"].Clear(); voucherObject.SetPortalButtonEnabled("btnSWRefConsume", false); } } } CalcBody_zzg(para, businessObject, voucherObject); }