void createListView;
{
lst_cari_guide = cariMainForm.AddNewProListView(pnl_cari_list,'lst_cari_guide');
lst_cari_guide.Properties.ItemSpace = 10;
clComponent.SetupComponent(lst_cari_guide,'{"Align":"Client","MarginBottom":10,"MarginTop":10,"MarginRight":20,"MarginLeft":20, "ItemColumnCount" : 1,"ItemHeight" :'+IntToStr(pnl_cari_list.height*0.27)+',
"BorderWidth":2,"RoundWidth":5, "RoundHeight":5}');
clRTMethod(lst_cari_guide, 'SendToBack');
}
void createDesignerPanel;
{
belgeDesignerPanel = cariMainForm.AddNewProListViewDesignerPanel(lst_cari_guide,'belgeDesignerPanel');
clComponent.SetupComponent(belgeDesignerPanel,'{"Height":300,"BackgroundColor":"#ffffff","RoundHeight":20,"RoundWidth":20,"BorderColor":"#1F8FEA","BorderWidth":2,
"Align":"Top"}');
lst_cari_guide.SetDesignerPanel(belgeDesignerPanel);
}
void createLabels;
{
lblCariName = cariMainForm.AddNewProLabel(belgeDesignerPanel,'lblCariName','cari Name');
clComponent.SetupComponent(lblCariName,'{"Align":"center","MarginRight":'+IntToStr(belgeDesignerPanel.Width*0.45)+',"MarginBottom":'+IntToStr(belgeDesignerPanel.Height*0.15)+
',"MarginTop":10,"TextBold":"yes","TextSize":22,"TextHorizontalAlign":"left","TextVerticalAlign":"left","AutoSize":"horizontal"}');
belgeDesignerPanel.AddPanelObject(lblCariName,clText);
lblCariCode = cariMainForm.AddNewProLabel(belgeDesignerPanel,'lblCariCode','cari code');
clComponent.SetupComponent(lblCariCode,'{"Align":"center","MarginRight":'+IntToStr(belgeDesignerPanel.Width*0.45)+',"MarginTop":'+IntToStr(belgeDesignerPanel.Height*0.12)+
',"TextBold":"no","TextSize":16,"TextHorizontalAlign":"left","TextVerticalAlign":"left","AutoSize":"horizontal"}');
belgeDesignerPanel.AddPanelObject(lblCariCode,clText);
lblCariSehir = cariMainForm.AddNewProLabel(belgeDesignerPanel,'lblCariSehir','cari il');
clComponent.SetupComponent(lblCariSehir,'{"Align":"center","MarginLeft":'+IntToStr(belgeDesignerPanel.Width*0.45)+',"MarginBottom":'+IntToStr(belgeDesignerPanel.Height*0.15)+
',"TextBold":"no","TextSize":16,"TextHorizontalAlign":"left","TextVerticalAlign":"left","AutoSize":"horizontal"}');
belgeDesignerPanel.AddPanelObject(lblCariSehir,clText);
lblCariIlce = cariMainForm.AddNewProLabel(belgeDesignerPanel,'lblCariIlce','cari ilce');
clComponent.SetupComponent(lblCariIlce,'{"Align":"center","MarginLeft":'+IntToStr(belgeDesignerPanel.Width*0.45)+',"MarginBottom":'+IntToStr(belgeDesignerPanel.Height*0.01)+
',"TextBold":"no","TextSize":16,"TextHorizontalAlign":"left","TextVerticalAlign":"left","AutoSize":"horizontal"}');
belgeDesignerPanel.AddPanelObject(lblCariIlce,clText);
lblToplamBakiye = cariMainForm.AddNewProLabel(belgeDesignerPanel,'lblToplamBakiye','cari bakiye');
clComponent.SetupComponent(lblToplamBakiye,'{"Align":"center","MarginLeft":'+IntToStr(belgeDesignerPanel.Width*0.45)+',"MarginTop":'+IntToStr(belgeDesignerPanel.Height*0.13)+
',"TextBold":"no","TextSize":16,"TextHorizontalAlign":"left","TextVerticalAlign":"left","AutoSize":"horizontal"}');
belgeDesignerPanel.AddPanelObject(lblToplamBakiye,clText);
}
void getData;
var
showListQuery: TClSqlQuery;
strCariTip : String;
{
lst_cari_guide.ClearList;
if(cmb_cari_type.ItemIndex <> 0 ) //eğer cari tipi seçiliyse
strCariTip='and CARI_TIPI='+QuotedStr (cmb_cari_type.GetValueIndex(cmb_cari_type.ItemIndex));
else //eğer cari tip hepsi ise
strCariTip='and 1=1';
showListQuery = TClSqlQuery.Create(nil);
showListQuery.Connection = Clomosy.DBSQLServerConnection;
try
try
showListQuery.sql.Text =
'SELECT
CARI_ADI as lblCariName,
CARI_KODU AS lblCariCode,
CARI_IL AS lblCariSehir,
CARI_ILCE AS lblCariIlce,
ALACAK_TOPLAM-BORC_TOPLAM AS lblToplamBakiye
FROM
TBLCARISB with(nolock)
WHERE
1=1'
+strCariTip+
'ORDER BY
CARI_ADI';
showListQuery.Open;
if (showListQuery.Found)
lst_cari_guide.clLoadProListViewDataFromDataset(showListQuery);
else
lst_cari_guide.ClearList;
except
ShowMessage('AddDataToListView1 '+'Exception Class: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage);
}
finally
showListQuery.Free;
}
}
createListView;
createDesignerPanel;
createLabels;
getData;