private void loadPos_TransactionType() { ListItem li = new ListItem("Select Pos_TransactionType...", "0"); ddlPos_TransactionType.Items.Add(li); List <Pos_TransactionType> pos_TransactionTypes = new List <Pos_TransactionType>(); pos_TransactionTypes = Pos_TransactionTypeManager.GetAllPos_TransactionTypes(); foreach (Pos_TransactionType pos_TransactionType in pos_TransactionTypes) { ListItem item = new ListItem(pos_TransactionType.Pos_TransactionTypeName.ToString(), pos_TransactionType.Pos_TransactionTypeID.ToString()); ddlPos_TransactionType.Items.Add(item); } }
private void initailaData() { loadACC_ChartOfAccountLabel4(); txtFromDate.Text = DateTime.Now.ToString("dd MMM yyyy"); txtToDate.Text = DateTime.Now.ToString("dd MMM yyyy"); //txtStockDate.Text = DateTime.Now.ToString("dd MMM yyyy"); List <Pos_TransactionType> allTransactionType = Pos_TransactionTypeManager.GetAllPos_TransactionTypes(); foreach (Pos_TransactionType type in allTransactionType) { if (type.ExtraField2 == "SR") { rbtnTransactionType.Items.Add(new ListItem(type.TransactionTypeName, type.Pos_TransactionTypeID.ToString())); } } rbtnTransactionType.SelectedValue = "13"; }
private void showPos_TransactionTypeGrid() { gvPos_TransactionType.DataSource = Pos_TransactionTypeManager.GetAllPos_TransactionTypes(); gvPos_TransactionType.DataBind(); }
private void applyRole() { List <Button> allAllowedButton = ButtonManager.GetAllButtonsByPageURLnUserID(HttpContext.Current.Request.Url.AbsoluteUri, getLogin().LoginID); //load the transaction Type rbtn List <Pos_TransactionType> allTransactionType = Pos_TransactionTypeManager.GetAllPos_TransactionTypes(); foreach (Pos_TransactionType type in allTransactionType) { foreach (Button btn in allAllowedButton) { if (btn.ButtonName == ("rbtn" + type.TransactionTypeName.Replace(" ", ""))) { rbtnTransactionType.Items.Add(new ListItem(type.TransactionTypeName, type.Pos_TransactionTypeID.ToString())); break; } } } rbtnTransactionType.SelectedValue = "13"; trSupplier.Visible = false; trWorkStation.Visible = false; ddlWorkStationForTransactionReport.Enabled = false; btnGenerateLinkForTransacationByID.Visible = false; btnDelivaryChalan.Visible = false; btnDeleteTransaction.Visible = false; btnCentralProductStockReport.Visible = false; btnWorkStationStockReport.Visible = false; btnLedgerSup.Visible = false; btnLedger.Visible = false; btnLedgerBR.Visible = false; btnCentralStockReport.Visible = false; btnShowroomStockReport.Visible = false; btnShowroomSalesReport.Visible = false; btnSalesPersonWiseSalesReport.Visible = false; btnDateWiseSalesReport.Visible = false; btnDayWiseSalesSummary.Visible = false; foreach (Button btn in allAllowedButton) { if (btn.ButtonName == "trSupplier") { trSupplier.Visible = true; } if (btn.ButtonName == "trWorkStation") { trWorkStation.Visible = true; } if (btn.ButtonName == "trWorkStation_Enabled") { ddlWorkStationForTransactionReport.Enabled = true; } else { ddlWorkStationForTransactionReport.SelectedValue = getLogin().ExtraField5; } if (btn.ButtonName == "btnGenerateLinkForTransacationByID") { btnGenerateLinkForTransacationByID.Visible = true; } if (btn.ButtonName == "btnDelivaryChalan") { btnDelivaryChalan.Visible = true; } if (btn.ButtonName == "btnDeleteTransaction") { btnDeleteTransaction.Visible = true; } if (btn.ButtonName == "btnCentralProductStockReport") { btnCentralProductStockReport.Visible = true; } if (btn.ButtonName == "btnWorkStationStockReport") { btnWorkStationStockReport.Visible = true; } if (btn.ButtonName == "btnLedgerSup") { //btnLedgerSup.Visible = true; } if (btn.ButtonName == "btnLedger") { btnLedger.Visible = true; } if (btn.ButtonName == "btnLedgerBR") { //btnLedgerBR.Visible = true; } if (btn.ButtonName == "btnCentralStockReport") { btnCentralStockReport.Visible = true; } if (btn.ButtonName == "btnShowroomStockReport") { btnShowroomStockReport.Visible = true; } if (btn.ButtonName == "btnShowroomSalesReport") { btnShowroomSalesReport.Visible = true; } if (btn.ButtonName == "btnSalesPersonWiseSalesReport") { btnSalesPersonWiseSalesReport.Visible = true; } if (btn.ButtonName == "btnDateWiseSalesReport") { btnDateWiseSalesReport.Visible = true; } if (btn.ButtonName == "btnDayWiseSalesSummary") { btnDayWiseSalesSummary.Visible = true; } } }