Ejemplo n.º 1
0
        protected void SearchButton_Click(object sender, EventArgs e)
        {
            if (IdentificationTaxNumberTextBox.Text.Trim().Equals(""))
            {
                LabelWarning.Text = "Abone Bulunamadı!";
                return;
            }

            var Subscriber = WebServiceHelpers.GetUserSubscriber(new SubscriberRequest()
            {
                IdentificationTaxNumber = IdentificationTaxNumberTextBox.Text.Trim()
            });

            SubscriberId = Subscriber.SubscriberId;

            if (SubscriberId > 0)
            {
                FillGrid();
            }
            else
            {
                GridViewInvoice.DataSource = null;
                GridViewInvoice.DataBind();
                LabelWarning.Text = "Aktif Abone Bulunamadı!";
            }
        }
        private void BindVoiceItem(string VoiceCode, string incode)
        {
            string    sql = "select GI_MATCODE,GI_NAME,GI_GUIGE,GI_UNIT,cast(SUM(GI_NUM) as float) AS GI_NUM,cast(round(AVG(GI_UNITPRICE),4) as float) AS GI_UNITPRICE,cast(round(SUM(GI_AMTMNY),2) as float) AS GI_AMTMNY,GI_TAXRATE,cast(round(AVG(GI_CTAXUPRICE),4) as float) AS GI_CTAXUPRICE,cast(round(SUM(GI_CTAMTMNY),2) as float) AS GI_CTAMTMNY  from TBFM_GHINVOICEDETAIL where GI_CODE='" + VoiceCode + "' and GI_UNICODE like '" + incode.Split('S')[0] + "%' group by GI_MATCODE,GI_NAME,GI_GUIGE,GI_UNIT,GI_TAXRATE";
            DataTable dt  = DBCallCommon.GetDTUsingSqlText(sql);

            GridViewInvoice.DataSource = dt;
            GridViewInvoice.DataBind();
        }
Ejemplo n.º 3
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     SqlDataSourceInvoice.InsertParameters["Shipment_Id"].DefaultValue   = dropShipmentId.SelectedValue;
     SqlDataSourceInvoice.InsertParameters["Sorder_Number"].DefaultValue = dropSorderNumber.SelectedValue;
     SqlDataSourceInvoice.InsertParameters["Product_Id"].DefaultValue    = dropProductId.SelectedValue;
     SqlDataSourceInvoice.InsertParameters["Payment_Id"].DefaultValue    = dropPaymentId.SelectedValue;
     SqlDataSourceInvoice.Insert();
     GridViewInvoice.DataBind();
     panelAddInvoice.Visible        = false;
     panelSaveInvoice.Visible       = true;
     dropShipmentId.SelectedIndex   = 0;
     dropSorderNumber.SelectedIndex = 0;
     dropPaymentId.SelectedIndex    = 0;
     dropProductId.SelectedIndex    = 0;
 }
Ejemplo n.º 4
0
        public void FillGrid()
        {
            SubscriberCheckResponse UserInfo = (SubscriberCheckResponse)Session["UserInfo"];

            var InvoiceAllUnpaidList = WebServiceHelpers.GetInvoicePaid(UserInfo.SubscriberId).ToList();

            if (InvoiceAllUnpaidList.Count > 0)
            {
                GridViewInvoice.DataSource = InvoiceAllUnpaidList;
                GridViewInvoice.DataBind();
            }
            else
            {
                GridViewInvoice.DataSource = null;
                GridViewInvoice.DataBind();
            }
        }
Ejemplo n.º 5
0
        public void FillGrid()
        {
            LabelWarning.Text = "";

            var InvoiceAllUnpaidList = WebServiceHelpers.GetInvoiceAllUnpaid(SubscriberId).ToList();

            if (InvoiceAllUnpaidList.Count > 0)
            {
                GridViewInvoice.DataSource = InvoiceAllUnpaidList;
                GridViewInvoice.DataBind();
            }
            else
            {
                GridViewInvoice.DataSource = null;
                GridViewInvoice.DataBind();
                LabelWarning.Text = "Ödenmemiş Fatura Bulunamadı!";
            }
        }
Ejemplo n.º 6
0
 protected void BindData()
 {
     //Admin
     ViewState["dtInvoice"] = oLNCT_Service.getData("I");
     //ViewState["dtSearch"] = (DataTable)ViewState["dtInvoice"];
     dtCustomerGroup      = customerGroupService.customerGroupData();
     dtCustomer           = customerService.customerData();
     dtCustomerDepartment = customerDepartmentService.customerDepartmentData();
     dtCustomerShipping   = customerShippingService.customerShippingData();
     dtItem          = itemService.itemData("'I'");
     dtPrice         = priceService.priceData();
     dtSale          = saleService.saleData();
     dtDeliveryRoute = deliveryRouteService.deliveryRouteData();
     dtWarehouse     = warehouseService.warehouseData();
     //Bind Data to GridViewInvoice
     GridViewInvoice.DataSource = (DataTable)ViewState["dtInvoice"];
     GridViewInvoice.DataBind();
 }
        protected void BindData(string id)
        {
            DataTable reqData = oSALE_ORDER_Service.getDataById(id);

            ViewState["reqData"] = reqData;

            lblDetailId.Text                    = reqData.Rows[0]["SALE_ORDER_ID"].ToString();
            lblDetailCustomerGroup.Text         = reqData.Rows[0]["Cus_Group_Name"].ToString();
            lblDetailCustomer.Text              = reqData.Rows[0]["Cus_Name"].ToString();
            lblDetailSaleOrderType.Text         = reqData.Rows[0]["SALE_ORDER_TYPE"].ToString();
            lblDetailVenderName.Text            = reqData.Rows[0]["VENDER_NAME"].ToString();
            lblDetailSaleOrderNumber.Text       = reqData.Rows[0]["SALE_ORDER_Number"].ToString();
            lblDetailSaleOrderBalance.Text      = reqData.Rows[0]["SALE_ORDER_Balance"].ToString();
            lblDetailPONumber.Text              = reqData.Rows[0]["PO_Number"].ToString();
            lblDetailSaleOrderShippingDate.Text = reqData.Rows[0]["SALE_ORDER_Shipping_Date"].ToString();
            double amount = Double.Parse(reqData.Rows[0]["SALE_ORDER_Amount"].ToString());

            lblDetailSaleOrderAmount.Text = string.Format("{0:C2}", amount);
            double balance = Double.Parse(reqData.Rows[0]["SALE_ORDER_Balance"].ToString());

            lblDetailSaleOrderBalance.Text  = string.Format("{0:C2}", balance);
            lblDetailSale.Text              = reqData.Rows[0]["Sale_Name"].ToString();
            lblDetailCostCenter.Text        = reqData.Rows[0]["COST_CENTER_NAME"].ToString();
            txtEditRemark.Text              = reqData.Rows[0]["SALE_ORDER_Remark"].ToString();
            RdWarehouseStatus.SelectedValue = reqData.Rows[0]["SALE_ORDER_Status"].ToString();

            DataTable reqDataDetail = oSALE_ORDER_Service.getDataDetail(id);

            ViewState["reqDataDetail"] = reqDataDetail;
            GridView.DataSource        = reqDataDetail;
            GridView.DataBind();

            ViewState["reqDataInvoice"] = oINVENTORY_Service.getDataBySaleOrder(lblDetailSaleOrderNumber.Text);
            GridViewInvoice.DataSource  = (DataTable)ViewState["reqDataInvoice"];
            GridViewInvoice.DataBind();

            ViewState["reqDataCreditNote"] = oCREDITNOTE_Service.getDataBySaleOrder(lblDetailSaleOrderNumber.Text);
            GridViewCreditNote.DataSource  = (DataTable)ViewState["reqDataCreditNote"];
            GridViewCreditNote.DataBind();

            ViewState["reqDataComment"] = oSALE_ORDER_Service.getDataCommentById(id);
            GridViewComment.DataSource  = (DataTable)ViewState["reqDataComment"];
            GridViewComment.DataBind();
        }