예제 #1
0
 public CreateInvoice GetInvoice(string companyid, string customerid)
 {
     CreateInvoice cr = new CreateInvoice();
     cr.companyid = companyid;
     cr.templateid = ProfileModel.GetDefaultTemplate(companyid);
     cr.IsCustomerChoosen = true;
     cr.customerid = customerid;
     return cr;
 }
예제 #2
0
        public CreateInvoice GetInvoice(string companyid, string customerid)
        {
            CreateInvoice cr = new CreateInvoice();

            cr.companyid         = companyid;
            cr.templateid        = ProfileModel.GetDefaultTemplate(companyid);
            cr.IsCustomerChoosen = true;
            cr.customerid        = customerid;
            return(cr);
        }
        public ActionResult Create()
        {
            string customerid = "";
            if (!String.IsNullOrEmpty(Request.QueryString["cid"]))
                customerid = Request.QueryString["cid"].ToString();

            CreateInvoice crinv = new CreateInvoice();
            if (customerid != "")
            {
                crinv = new CreateInvoice().GetInvoice(Session["companyid"].ToString(), customerid);
                crinv.templatedata = GetInvoiceTemplate(crinv.templateid);
                return View(crinv);
            }
            else
            {
                crinv = new CreateInvoice().GetInvoice(Session["companyid"].ToString());
                crinv.templatedata = GetInvoiceTemplate(crinv.templateid);
                return View(crinv);
            }
        }