Ejemplo n.º 1
0
 public static Business.ApplicationService.profile GetUserProfile(string ownerid)
 {
     DataLayer bd = new DataLayer();
     Business.ApplicationService.profile objProfile = new Business.ApplicationService.profile();
     objProfile = bd.GetUserProfile(ownerid);
     return objProfile;
 }
Ejemplo n.º 2
0
        public bool ChangePassword(UI.Models.ProfileModelObject.ChangePassword changepassworddata,string accesstoken)
        {
            bool passwordchangestatus = false;
            Business.DataLayer datalayer = new DataLayer();
            datalayer.ChangePassword(changepassworddata.newpassword, changepassworddata.AuthToken, accesstoken);

            return passwordchangestatus;
        }
Ejemplo n.º 3
0
 public static string GetDefaultTemplate(string companyid)
 {
     string templateid = "";
     DataLayer dataLayer = new DataLayer();
     Business.ApplicationService.profile userprofile = dataLayer.GetUserProfile(companyid);
     templateid = userprofile.templateid;
     return templateid;
 }
        public void UpdateInvoice(string invoiceid, string customerid, string invoiceobj, int status)
        {
            dynamic invoiceobject = System.Web.Helpers.Json.Decode(invoiceobj);
            string  xmldocument   = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(invoiceobj, "invoice").InnerXml;

            xmldocument = xmldocument.Replace("  ", "");
            Business.DataLayer bd = new Business.DataLayer();
            bd.UpdateInvoice(invoiceid, Session["userid"].ToString(), Session["companyid"].ToString(), customerid, Session["companyid"].ToString(), "invoice", "outbound", status, xmldocument);
        }
        public string CreateInvoice(string invoiceobj)
        {
            dynamic invoiceobject = System.Web.Helpers.Json.Decode(invoiceobj);
            string xmldocument = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(invoiceobj, "invoice").InnerXml;
            xmldocument = xmldocument.Replace("  ", "");
            Business.DataLayer bd = new Business.DataLayer();
            string invoice = bd.GenerateInvoice(Session["userid"].ToString(), Session["companyid"].ToString(), "", Session["companyid"].ToString(), "invoice", "outbound", xmldocument);

            return invoice;
        }
        public string AddExternalInvoice(string invoiceobj)
        {
            dynamic invoiceobject = System.Web.Helpers.Json.Decode(invoiceobj);
            string  xmldocument   = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(invoiceobj, "invoice").InnerXml;

            xmldocument = xmldocument.Replace("  ", "");
            Business.DataLayer bd      = new Business.DataLayer();
            string             invoice = bd.GenerateInvoice(Session["userid"].ToString(), Session["companyid"].ToString(), "", Session["companyid"].ToString(), "invoice", "inbound", xmldocument);

            return(invoice);
        }
        public string GetInvoiceTemplate(string tempid)
        {
            Business.DataLayer   bd = new Business.DataLayer();
            Business.AppTemplate invoicetemplate = bd.GetInvoiceTemplate(tempid, Session["companyid"].ToString());
            if (invoicetemplate.data == "" || invoicetemplate.data == null)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<div><p>");
                sb.Append("<a href=\"/invoice\">Click to View All Invoices</a>");
                sb.Append("</p></div>");

                invoicetemplate.data = sb.ToString();
            }
            return(invoicetemplate.data);
        }
Ejemplo n.º 8
0
        public PaymentInvoice GetInvoice(string invoiceid, string ownerid, string creatorid)
        {
            Business.DataLayer bd = new Business.DataLayer();


            Business.AppInvoice appinv      = bd.GetInvoice(invoiceid, ownerid, creatorid);
            PaymentInvoice      tempinvoice = new PaymentInvoice();

            tempinvoice.invoicedata   = appinv.data;
            tempinvoice.createddate   = appinv.createddate;
            tempinvoice.invstatus     = appinv.status;
            tempinvoice.toaccid       = "";
            tempinvoice.toaccountname = "";
            return(tempinvoice);
        }
Ejemplo n.º 9
0
        public List <PaymentInvoice> GetOutboundInvoices(string ownerid, string creatorid)
        {
            Business.DataLayer bd = new Business.DataLayer();

            List <PaymentInvoice> invoices = new List <PaymentInvoice>();

            foreach (Business.AppInvoice appinv in bd.GetAlliInvoices(ownerid, creatorid, "invoice", "outbound"))
            {
                PaymentInvoice tempinvoice = new PaymentInvoice();
                tempinvoice.invoiceid     = appinv.InvoiceId;
                tempinvoice.invoicedata   = appinv.data;
                tempinvoice.createddate   = appinv.createddate;
                tempinvoice.invstatus     = appinv.status;
                tempinvoice.toaccid       = "";
                tempinvoice.toaccountname = "";
                invoices.Add(tempinvoice);
            }

            return(invoices);
        }
Ejemplo n.º 10
0
        public List<PaymentInvoice> GetOutboundInvoices(string ownerid, string creatorid)
        {
            Business.DataLayer bd = new Business.DataLayer();

            List<PaymentInvoice> invoices = new List<PaymentInvoice>();
            foreach (Business.AppInvoice appinv in bd.GetAlliInvoices(ownerid, creatorid, "invoice", "outbound"))
            {
                PaymentInvoice tempinvoice = new PaymentInvoice();
                tempinvoice.invoiceid = appinv.InvoiceId;
                tempinvoice.invoicedata = appinv.data;
                tempinvoice.createddate = appinv.createddate;
                tempinvoice.invstatus = appinv.status;
                tempinvoice.toaccid = "";
                tempinvoice.toaccountname = "";
                invoices.Add(tempinvoice);
            }

            return invoices;
        }
        public string GetInvoiceTemplate(string tempid)
        {
            Business.DataLayer bd = new Business.DataLayer();
            Business.AppTemplate invoicetemplate = bd.GetInvoiceTemplate(tempid, Session["companyid"].ToString());
            if (invoicetemplate.data == "" || invoicetemplate.data == null)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<div><p>");
                sb.Append("<a href=\"/invoice\">Click to View All Invoices</a>");
                sb.Append("</p></div>");

                invoicetemplate.data = sb.ToString();
            }
            return invoicetemplate.data;
        }
 public void UpdateInvoice(string invoiceid, string customerid, string invoiceobj, int status)
 {
     dynamic invoiceobject = System.Web.Helpers.Json.Decode(invoiceobj);
     string xmldocument = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(invoiceobj, "invoice").InnerXml;
     xmldocument = xmldocument.Replace("  ", "");
     Business.DataLayer bd = new Business.DataLayer();
     bd.UpdateInvoice(invoiceid, Session["userid"].ToString(), Session["companyid"].ToString(), customerid, Session["companyid"].ToString(), "invoice", "outbound", status, xmldocument);
 }
 public string AddWeekTimesheet(string employeeid, string employeename, string clientid, string clientname, string startdate, string enddate, string data)
 {
     DataLayer datalayer = new DataLayer();
     string timesheetid = datalayer.CreateTimeSheet(Session["companyid"].ToString(), Session["userid"].ToString(), employeeid, employeename, clientid, clientname, startdate, enddate, data);
     return timesheetid;
 }
 public string UpdateWeekTimesheet(string id, string employeeid, string employeename, string clientid, string clientname, string startdate, string enddate, int status, string data)
 {
     //dynamic invoiceobject = System.Web.Helpers.Json.Decode(data);
     //string xmldocument = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(data, "timesheet").InnerXml;
     //xmldocument = xmldocument.Replace("  ", "");
     DataLayer datalayer = new DataLayer();
     bool timesheetstat = datalayer.UpdateTimeSheet(id, Session["companyid"].ToString(), Session["userid"].ToString(), employeeid, employeename, clientid, clientname, startdate, enddate, data);
     return timesheetstat.ToString();
 }
Ejemplo n.º 15
0
 public AppTemplate GetInvoiceemplate(string templateid, string ownerid)
 {
     Business.DataLayer   bd = new Business.DataLayer();
     Business.AppTemplate invoicetemplate = bd.GetInvoiceTemplate(templateid, ownerid);
     return(invoicetemplate);
 }
Ejemplo n.º 16
0
 public static bool GetProfilesetupstatus(string companyid)
 {
     DataLayer bd = new DataLayer();
     return bd.GetSetupStatus(companyid);
 }
Ejemplo n.º 17
0
 public AppTemplate GetInvoiceemplate(string templateid, string ownerid)
 {
     Business.DataLayer bd = new Business.DataLayer();
     Business.AppTemplate invoicetemplate = bd.GetInvoiceTemplate(templateid, ownerid);
     return invoicetemplate;
 }
Ejemplo n.º 18
0
        public PaymentInvoice GetInvoice(string invoiceid, string ownerid, string creatorid)
        {
            Business.DataLayer bd = new Business.DataLayer();

            Business.AppInvoice appinv = bd.GetInvoice(invoiceid, ownerid, creatorid);
            PaymentInvoice tempinvoice = new PaymentInvoice();
            tempinvoice.invoicedata = appinv.data;
            tempinvoice.createddate = appinv.createddate;
            tempinvoice.invstatus = appinv.status;
            tempinvoice.toaccid = "";
            tempinvoice.toaccountname = "";
            return tempinvoice;
        }