Exemplo n.º 1
0
        public System.Collections.IEnumerable GetPaymankars()
        {
            Guid?_inv = Helpers.SessionHelpers.GetInvoiceID();

            Model.Paymankar _pay = new Model.Paymankar();
            return(_pay.GetPaymanakrByInvoiceID(_inv));//if inv be null it return all paymankar(couce he's admin
        }
Exemplo n.º 2
0
        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            if (OnSearchCompelete != null)
            {
                var data = new Model.Paymankar().SearchByConditions(GetSearchCondition());

                OnSearchCompelete(data);
            }
        }
Exemplo n.º 3
0
        protected void grdPaymankar_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            var data  = e.Item as Telerik.Web.UI.GridDataItem;
            var _item = e.Item.DataItem as Model.Paymankar;

            if (data == null)
            {
                return;
            }
            var inv = data.GetDataKeyValue("InvoiceID") as Guid?;

            if (inv == null)//first create invoice
            {
                var             idpay = data.GetDataKeyValue("ID");
                Model.Paymankar _pay  = new Model.Paymankar();
                inv = Guid.NewGuid();
                _pay.SetInvoiceID(idpay.ToInt32(), inv);
                grdPaymankar.DataBind();
            }
            invoice.InvoiceID = inv;
            invoice.Rebind();
        }
Exemplo n.º 4
0
 public static void SetCompany(Model.Paymankar Company)
 {
     Set <Model.Paymankar>(Company, Sessions.Company);
 }