Exemplo n.º 1
0
        protected void ddlScheme_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();

            ds = objPricelist.GetPriceListView(recid);

            DataSet dsScheme = new DataSet();

            dsScheme = objScheme.GetSchemeView(Convert.ToInt32(ddlScheme.SelectedValue), "");

            int   PriceList_Id, Item_Id, Scheme_Id, MspCalc, BpCalc, MspF, BpF;
            float MRP, DP, MSP, BestPrice, Discounts, MspPer, BpPer;


            MspPer = Convert.ToSingle(dsScheme.Tables[0].Rows[0]["msp"]);
            BpPer  = Convert.ToSingle(dsScheme.Tables[0].Rows[0]["bp"]);

            PriceList_Id       = recid;
            Item_Id            = Convert.ToInt32(ddlItem.SelectedValue);
            MRP                = Convert.ToSingle(mrp_text.Text);
            Scheme_Id          = Convert.ToInt32(ddlScheme.SelectedValue);
            DP                 = Convert.ToSingle(dprice_text.Text);
            MspCalc            = Convert.ToInt32((MspPer / 100) * DP);
            BpCalc             = Convert.ToInt32((BpPer / 100) * DP);
            MspF               = Convert.ToInt32(DP - MspCalc);
            BpF                = Convert.ToInt32(DP - BpCalc);
            Discounts          = Convert.ToSingle(dscnt_text.Text);
            MSP                = MspF - Discounts;
            BestPrice          = BpF - Discounts;
            msp_text.Text      = MSP.ToString();
            bstprice_text.Text = BestPrice.ToString();
        }
Exemplo n.º 2
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            MSP list = (from msp in listMSP where msp.name.ToLower() == txtName.Text.ToLower() select msp).FirstOrDefault <MSP>();

            listMSP.Remove(list);
            LVMSP.DataContext = null;
            LVMSP.DataContext = listMSP;
        }
Exemplo n.º 3
0
        private void LVMSP_Loaded(object sender, RoutedEventArgs e)
        {
            listMSP = new List <MSP>();
            MSP matt = new MSP("Matt Pasco", "Michigan State");

            listMSP.Add(matt);
            LVMSP = sender as ListView;

            LVMSP.DataContext = listMSP;
        }
Exemplo n.º 4
0
		public IEnumerable<MSP.Client.DataContracts.Image> GetDbImages (MSP.Client.DataContracts.FilterType filterType, int start, int count)
		{
			ImagesResponse response = AppDelegateIPhone.AIphone.ImgServ.GetAlbumImages(start, count, 0, album.Id);
			return response == null ? null : response.Images;
		}