compeltata gestione cliente!
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -28,25 +28,17 @@
|
||||
<div class="col-xs-2 text-nowrap pRZero">
|
||||
<asp:LinkButton runat="server" ID="lbIdxDoc2" CommandArgument='<%# Eval("idxDoc") %>' CausesValidation="False" CommandName="Select">
|
||||
<asp:Label ID="lblNum" runat="server" Text='<%# Eval("num","<b>{0:000}</b>") %>' />/<asp:Label ID="lblanno" runat="server" Text='<%# Eval("anno") %>' />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
</asp:LinkButton></div><div class="col-xs-6">
|
||||
<asp:LinkButton runat="server" ID="lbSelCli" CommandArgument='<%# Eval("idxCli") %>' OnClick="lbSelCli_Click">
|
||||
<asp:Label ID="lblcodCli" runat="server" Text='<%# Eval("RagSoc","<b>{0}</b>") %>' ToolTip='<%# Eval("RagSoc") %>' />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-2 text-right text-nowrap max20em pLZero pRZero">
|
||||
</asp:LinkButton></div><div class="col-xs-2 text-right text-nowrap max20em pLZero pRZero">
|
||||
<asp:LinkButton runat="server" ID="lbSelTipo" CommandArgument='<%# Eval("tipo") %>' OnClick="lbSelTipo_Click">
|
||||
<asp:Label ID="lblTipo" runat="server" Text='<%# Eval("tipo") %>' ToolTip='<%# Eval("tipo") %>' />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-1 text-right pLZero">
|
||||
</asp:LinkButton></div><div class="col-xs-1 text-right pLZero">
|
||||
<%--<asp:HyperLink runat="server" ID="lnkPdf" Target="_blank" NavigateUrl='<%# getUrlFatturaPdf(Eval("anno"),Eval("num")) %>'>--%>
|
||||
<asp:HyperLink runat="server" ID="lnkPdf" Target="_blank" NavigateUrl='<%# getUrlFatturaPdf(Eval("idxDoc")) %>'>
|
||||
<i class="fa fa-print fa-2x" aria-hidden="true"></i>
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-xs-12 max40em">
|
||||
</asp:HyperLink></div><div class="col-xs-12 max40em">
|
||||
<asp:Label ID="lblDescrizione" runat="server" CssClass="docNote " Text='<%# Bind("Descrizione") %>' ToolTip='<%# Bind("Descrizione") %>' />
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,10 +51,7 @@
|
||||
<div class="col-xs-12 text-right">
|
||||
<asp:LinkButton runat="server" ID="lbIdxDoc3" CommandArgument='<%# Eval("idxDoc") %>' CausesValidation="False" CommandName="Select">
|
||||
<asp:Label ID="lblNetto" runat="server" Text='<%# Eval("netto", "<b>{0:C2}</b>") %>' />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row fontStd text-nowrap">
|
||||
</asp:LinkButton></div></div><div class="row fontStd text-nowrap">
|
||||
<div class="col-xs-8 pRZero">
|
||||
<uc1:mod_barPlot runat="server" ID="mod_barPlotPag" elencoValori='<%# getBarData(Eval("totPagato"), Eval("totScadenze"), "greenBar", "redBar") %>' resolution="1" Visible='<%# showPagam %>' />
|
||||
<uc1:mod_barPlot runat="server" ID="mod_barPlotCostiAss" elencoValori='<%# getBarData(Eval("CostiAss"), Convert.ToDecimal(Eval("netto"))-Convert.ToDecimal(Eval("CostiAss")), "grayBar", "greenBar") %>' resolution="1" Visible='<%# showCosti %>' />
|
||||
|
||||
@@ -4,20 +4,363 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<asp:LinkButton runat="server" ID="btnAddCli" CssClass="btn btn-success" OnClick="btnAddCli_Click">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
<asp:Label runat="server" ID="lblBtnNew">NUOVO</asp:Label>
|
||||
<div class="col-xs-3">
|
||||
<asp:LinkButton runat="server" ID="btnAddCli" CssClass="btn btn-success form-control" OnClick="btnAddCli_Click">
|
||||
<i class="fa <%: btnNewIcon %>" aria-hidden="true"></i>
|
||||
<asp:Label runat="server" ID="lblBtnNew"><%: btnNewMsg %></asp:Label>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
<uc1:mod_searchBase runat="server" ID="mod_searchBase" placeholderSearch="[R]icerca pazienti" searchKey="R" />
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<div class="col-xs-1">
|
||||
<uc1:mod_righePag runat="server" ID="mod_righePag" />
|
||||
</div>
|
||||
<div class="col-xs-12" id="divAddNew" runat="server" visible="false">
|
||||
dati x aggiungere...
|
||||
<div class="col-xs-12" id="divAddNew" runat="server">
|
||||
<div style="padding: 0 15px;">
|
||||
<asp:FormView runat="server" ID="frmView" DataSourceID="odsSelected" Width="100%" DataKeyNames="idxCli" OnItemInserted="frmView_ItemInserted" OnItemUpdated="frmView_ItemUpdated">
|
||||
<EditItemTemplate>
|
||||
<div class="row bg-danger">
|
||||
<div class="col-xs-8 text-left">
|
||||
<b style="font-size: 1.5em;">
|
||||
<asp:TextBox ID="RagSocText" runat="server" Text='<%# Bind("RagSoc") %>' placeholder="Cognome Nome" /></b>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<b>
|
||||
<asp:TextBox ID="P_ivaText" runat="server" Text='<%# Bind("P_iva") %>' placeholder="partita iva" /></b>
|
||||
</div>
|
||||
<div class="col-xs-12 text-right">
|
||||
<b>
|
||||
<asp:TextBox ID="C_FiscText" runat="server" Text='<%# Bind("C_Fisc") %>' placeholder="codice fiscale" /></b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-warning">
|
||||
<div class="col-xs-4 text-left">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Natali</b>
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
Data:
|
||||
</div>
|
||||
<div class="col-xs-9 text-left">
|
||||
<asp:TextBox ID="DOBirthText" runat="server" Text='<%# Bind("DOBirth","{0:yyyy-MM-dd}") %>' TextMode="Date" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-3 text-left">
|
||||
Luogo:
|
||||
</div>
|
||||
<div class="col-xs-9 text-left">
|
||||
<asp:TextBox ID="POBirthText" runat="server" Text='<%# Bind("POBirth") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-3 text-left">
|
||||
Sesso:
|
||||
</div>
|
||||
<div class="col-xs-9 text-left">
|
||||
<asp:RadioButtonList runat="server" ID="rblSesso" SelectedValue='<%# Bind("Sesso") %>' RepeatLayout="Flow" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Value="M" Text="M"></asp:ListItem>
|
||||
<asp:ListItem Value="F" Text="F"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-left">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Residenza</b>
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
via
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="ViaText" runat="server" Text='<%# Bind("Via") %>' />
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
località
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="LocalitàText" runat="server" Text='<%# Bind("Località") %>' />
|
||||
</div>
|
||||
<div class="col-xs-2 text-left">
|
||||
cap
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<asp:TextBox ID="CapText" runat="server" Text='<%# Bind("Cap") %>' />
|
||||
</div>
|
||||
<div class="col-xs-2 text-left">
|
||||
prov
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<asp:TextBox ID="ProvinciaText" runat="server" Text='<%# Bind("Provincia") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Contatti</b>
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
tel:
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="telText" runat="server" Text='<%# Bind("tel") %>' />
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
email:
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="emailText" runat="server" Text='<%# Bind("email") %>' />
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
Note:
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="NoteText" runat="server" Text='<%# Bind("Note") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-warning">
|
||||
<div class="col-xs-6 text-center">
|
||||
<asp:LinkButton ID="UpdateButton" CssClass="btn btn-success form-control" runat="server" CausesValidation="True" CommandName="Update" Text="Aggiorna" />
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<asp:LinkButton ID="UpdateCancelButton" CssClass="btn btn-warning form-control" runat="server" CausesValidation="False" CommandName="Cancel" Text="Annulla" />
|
||||
</div>
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<InsertItemTemplate>
|
||||
<div class="row bg-danger">
|
||||
<div class="col-xs-8 text-left">
|
||||
<b style="font-size: 1.5em;">
|
||||
<asp:TextBox ID="RagSocText" runat="server" Text='<%# Bind("RagSoc") %>' placeholder="Cognome Nome" /></b>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<b>
|
||||
<asp:TextBox ID="P_ivaText" runat="server" Text='<%# Bind("P_iva") %>' placeholder="partita iva" /></b>
|
||||
</div>
|
||||
<div class="col-xs-12 text-right">
|
||||
<b>
|
||||
<asp:TextBox ID="C_FiscText" runat="server" Text='<%# Bind("C_Fisc") %>' placeholder="codice fiscale" /></b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-warning">
|
||||
<div class="col-xs-4 text-left">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Natali</b>
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
Data:
|
||||
</div>
|
||||
<div class="col-xs-9 text-left">
|
||||
<asp:TextBox ID="DOBirthText" runat="server" Text='<%# Bind("DOBirth") %>' TextMode="Date" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-3 text-left">
|
||||
Luogo:
|
||||
</div>
|
||||
<div class="col-xs-9 text-left">
|
||||
<asp:TextBox ID="POBirthText" runat="server" Text='<%# Bind("POBirth") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-3 text-left">
|
||||
Sesso:
|
||||
</div>
|
||||
<div class="col-xs-9 text-left">
|
||||
<asp:RadioButtonList runat="server" ID="rblSesso" SelectedValue='<%# Bind("Sesso") %>' RepeatLayout="Flow" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Value="M"></asp:ListItem>
|
||||
<asp:ListItem Value="F"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-left">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Residenza</b>
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
via
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="ViaText" runat="server" Text='<%# Bind("Via") %>' />
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
località
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="LocalitàText" runat="server" Text='<%# Bind("Località") %>' />
|
||||
</div>
|
||||
<div class="col-xs-2 text-left">
|
||||
cap
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<asp:TextBox ID="CapText" runat="server" Text='<%# Bind("Cap") %>' />
|
||||
</div>
|
||||
<div class="col-xs-2 text-left">
|
||||
prov
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<asp:TextBox ID="ProvinciaText" runat="server" Text='<%# Bind("Provincia") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Contatti</b>
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
tel:
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="telText" runat="server" Text='<%# Bind("tel") %>' />
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
email:
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="emailText" runat="server" Text='<%# Bind("email") %>' />
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
Note:
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<asp:TextBox ID="NoteText" runat="server" Text='<%# Bind("Note") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-warning">
|
||||
<div class="col-xs-6 text-center">
|
||||
<asp:LinkButton ID="InsertButton" CssClass="btn btn-success form-control" runat="server" CausesValidation="True" CommandName="Insert" Text="Inserisci" />
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<asp:LinkButton ID="InsertCancelButton" CssClass="btn btn-warning form-control" runat="server" CausesValidation="False" CommandName="Cancel" Text="Annulla" />
|
||||
</div>
|
||||
</div>
|
||||
</InsertItemTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="row bg-primary">
|
||||
<div class="col-xs-8 text-left">
|
||||
<b style="font-size: 1.5em;">
|
||||
<asp:Label ID="RagSocLabel" runat="server" Text='<%# Bind("RagSoc") %>' /></b>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<div class="row">
|
||||
<div class="col-xs-3 text-left">
|
||||
p.iva:
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<b>
|
||||
<asp:Label ID="P_ivaLabel" runat="server" Text='<%# Bind("P_iva") %>' /></b>
|
||||
</div>
|
||||
<div class="col-xs-3 text-left">
|
||||
C.Fis:
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<b>
|
||||
<asp:Label ID="C_FiscLabel" runat="server" Text='<%# Bind("C_Fisc") %>' /></b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-info">
|
||||
<div class="col-xs-4 text-left">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Natali</b>
|
||||
</div>
|
||||
<div class="col-xs-4 text-left">
|
||||
Data:
|
||||
</div>
|
||||
<div class="col-xs-8 text-left">
|
||||
<asp:Label ID="DOBirthLabel" runat="server" Text='<%# Bind("DOBirth", "{0:dd/MM/yyyy}") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-left">
|
||||
Luogo:
|
||||
</div>
|
||||
<div class="col-xs-8 text-left">
|
||||
<asp:Label ID="POBirthLabel" runat="server" Text='<%# Bind("POBirth") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-left">
|
||||
Sesso:
|
||||
</div>
|
||||
<div class="col-xs-8 text-left">
|
||||
<asp:Label ID="SessoLabel" runat="server" Text='<%# Bind("Sesso") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-left">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Residenza</b>
|
||||
</div>
|
||||
<div class="col-xs-12 text-left">
|
||||
via
|
||||
<asp:Label ID="ViaLabel" runat="server" Text='<%# Bind("Via") %>' />
|
||||
</div>
|
||||
<div class="col-xs-12 text-left">
|
||||
<asp:Label ID="CapLabel" runat="server" Text='<%# Bind("Cap") %>' />,
|
||||
<asp:Label ID="LocalitàLabel" runat="server" Text='<%# Bind("Località") %>' />
|
||||
-
|
||||
<asp:Label ID="ProvinciaLabel" runat="server" Text='<%# Bind("Provincia") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<b>Contatti</b>
|
||||
</div>
|
||||
<div class="col-xs-4 text-left">
|
||||
tel:
|
||||
</div>
|
||||
<div class="col-xs-8 text-right">
|
||||
<asp:Label ID="telLabel" runat="server" Text='<%# Bind("tel") %>' />
|
||||
</div>
|
||||
<div class="col-xs-4 text-left">
|
||||
email:
|
||||
</div>
|
||||
<div class="col-xs-8 text-right">
|
||||
<asp:Label ID="emailLabel" runat="server" Text='<%# Bind("email") %>' />
|
||||
</div>
|
||||
<div class="col-xs-4 text-left">
|
||||
Note:
|
||||
</div>
|
||||
<div class="col-xs-8 text-right">
|
||||
<asp:Label ID="NoteLabel" runat="server" Text='<%# Bind("Note") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:FormView>
|
||||
<asp:ObjectDataSource ID="odsSelected" runat="server" SelectMethod="ClienteSel" TypeName="MedAP_data.MedAPModel" OldValuesParameterFormatString="original_{0}" DataObjectTypeName="MedAP_data.Clienti" InsertMethod="ClientiInsert" UpdateMethod="ClientiUpdate">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="grView" DefaultValue="0" Name="idxCli" PropertyName="SelectedValue" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataSourceID="ods" Width="100%" CssClass="table table-striped" AllowPaging="True" OnPageIndexChanged="grView_PageIndexChanged" DataKeyNames="idxCli" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
@@ -72,10 +415,9 @@
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="ElencoClienti" TypeName="MedAP_data.MedAPModel" EnablePaging="True" SelectCountMethod="ElencoClientiCount" OldValuesParameterFormatString="original_{0}">
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="Clienti" TypeName="MedAP_data.MedAPModel" EnablePaging="True" SelectCountMethod="ClientiCount" OldValuesParameterFormatString="original_{0}">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="mod_searchBase" DefaultValue="" Name="searchMe" PropertyName="searchVal" Type="String" />
|
||||
<asp:Parameter DefaultValue="0" Name="startRowIndex" Type="Int32" />
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace SHERPA.WebUserControl
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
//divAddNew.Visible = false;
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent(ucEvType.Reset);
|
||||
@@ -70,19 +71,67 @@ namespace SHERPA.WebUserControl
|
||||
|
||||
protected void btnAddCli_Click(object sender, EventArgs e)
|
||||
{
|
||||
divAddNew.Visible = !divAddNew.Visible;
|
||||
if(divAddNew.Visible)
|
||||
fixDivDetail();
|
||||
}
|
||||
|
||||
private void fixDivDetail()
|
||||
{
|
||||
// nuovo porta ad ADD NEW o EDIT secondo selezione...
|
||||
if (grView.SelectedIndex >= 0)
|
||||
{
|
||||
lblBtnNew.Text = "Nascondi";
|
||||
frmView.ChangeMode(FormViewMode.Edit);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblBtnNew.Text = "NUOVO";
|
||||
frmView.ChangeMode(FormViewMode.Insert);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Imposta il messaggio del BTN NEW secondo condizioni
|
||||
/// </summary>
|
||||
public string btnNewMsg
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "ND";
|
||||
// se è selezionato qualcosa il button è EDIT, altrimenti è NUOVO
|
||||
if (grView.SelectedIndex < 0)
|
||||
{
|
||||
answ = "NUOVO";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "EDIT";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta il COLORE del BTN NEW secondo condizioni
|
||||
/// </summary>
|
||||
public string btnNewIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
// se è selezionato qualcosa il button è EDIT, altrimenti è NUOVO
|
||||
if (grView.SelectedIndex < 0)
|
||||
{
|
||||
answ = "fa-plus";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "fa-pencil";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// mostro dettaglio!
|
||||
raiseEvent(ucEvType.Selected);
|
||||
}
|
||||
|
||||
@@ -95,5 +144,16 @@ namespace SHERPA.WebUserControl
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected void frmView_ItemInserted(object sender, FormViewInsertedEventArgs e)
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
protected void frmView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,24 @@ namespace SHERPA.WebUserControl {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAddNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo frmView.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.FormView frmView;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsSelected.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsSelected;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -92,5 +92,140 @@ namespace MedAP_data
|
||||
|
||||
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<RigheDoc>("stp_docRows_getByIdxDoc", mergeOption, idxDocParameter);
|
||||
}
|
||||
|
||||
public virtual int stp_clienti_delete(Nullable<int> original_idxCli)
|
||||
{
|
||||
var original_idxCliParameter = original_idxCli.HasValue ?
|
||||
new ObjectParameter("Original_idxCli", original_idxCli) :
|
||||
new ObjectParameter("Original_idxCli", typeof(int));
|
||||
|
||||
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_clienti_delete", original_idxCliParameter);
|
||||
}
|
||||
|
||||
public virtual int stp_clienti_insert(string ragSoc, string sesso, string pOBirth, Nullable<System.DateTime> dOBirth, string p_iva, string c_Fisc, string via, string localita, string cap, string provincia, string pagamento, string note, string idxGruppo)
|
||||
{
|
||||
var ragSocParameter = ragSoc != null ?
|
||||
new ObjectParameter("RagSoc", ragSoc) :
|
||||
new ObjectParameter("RagSoc", typeof(string));
|
||||
|
||||
var sessoParameter = sesso != null ?
|
||||
new ObjectParameter("Sesso", sesso) :
|
||||
new ObjectParameter("Sesso", typeof(string));
|
||||
|
||||
var pOBirthParameter = pOBirth != null ?
|
||||
new ObjectParameter("POBirth", pOBirth) :
|
||||
new ObjectParameter("POBirth", typeof(string));
|
||||
|
||||
var dOBirthParameter = dOBirth.HasValue ?
|
||||
new ObjectParameter("DOBirth", dOBirth) :
|
||||
new ObjectParameter("DOBirth", typeof(System.DateTime));
|
||||
|
||||
var p_ivaParameter = p_iva != null ?
|
||||
new ObjectParameter("P_iva", p_iva) :
|
||||
new ObjectParameter("P_iva", typeof(string));
|
||||
|
||||
var c_FiscParameter = c_Fisc != null ?
|
||||
new ObjectParameter("C_Fisc", c_Fisc) :
|
||||
new ObjectParameter("C_Fisc", typeof(string));
|
||||
|
||||
var viaParameter = via != null ?
|
||||
new ObjectParameter("Via", via) :
|
||||
new ObjectParameter("Via", typeof(string));
|
||||
|
||||
var localitaParameter = localita != null ?
|
||||
new ObjectParameter("Localita", localita) :
|
||||
new ObjectParameter("Localita", typeof(string));
|
||||
|
||||
var capParameter = cap != null ?
|
||||
new ObjectParameter("Cap", cap) :
|
||||
new ObjectParameter("Cap", typeof(string));
|
||||
|
||||
var provinciaParameter = provincia != null ?
|
||||
new ObjectParameter("Provincia", provincia) :
|
||||
new ObjectParameter("Provincia", typeof(string));
|
||||
|
||||
var pagamentoParameter = pagamento != null ?
|
||||
new ObjectParameter("Pagamento", pagamento) :
|
||||
new ObjectParameter("Pagamento", typeof(string));
|
||||
|
||||
var noteParameter = note != null ?
|
||||
new ObjectParameter("Note", note) :
|
||||
new ObjectParameter("Note", typeof(string));
|
||||
|
||||
var idxGruppoParameter = idxGruppo != null ?
|
||||
new ObjectParameter("idxGruppo", idxGruppo) :
|
||||
new ObjectParameter("idxGruppo", typeof(string));
|
||||
|
||||
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_clienti_insert", ragSocParameter, sessoParameter, pOBirthParameter, dOBirthParameter, p_ivaParameter, c_FiscParameter, viaParameter, localitaParameter, capParameter, provinciaParameter, pagamentoParameter, noteParameter, idxGruppoParameter);
|
||||
}
|
||||
|
||||
public virtual int stp_clienti_update(Nullable<int> original_idxCli, string ragSoc, string sesso, string pOBirth, Nullable<System.DateTime> dOBirth, string p_iva, string c_Fisc, string via, string localita, string cap, string provincia, string pagamento, string email, string tel, string note, string idxGruppo)
|
||||
{
|
||||
var original_idxCliParameter = original_idxCli.HasValue ?
|
||||
new ObjectParameter("Original_idxCli", original_idxCli) :
|
||||
new ObjectParameter("Original_idxCli", typeof(int));
|
||||
|
||||
var ragSocParameter = ragSoc != null ?
|
||||
new ObjectParameter("RagSoc", ragSoc) :
|
||||
new ObjectParameter("RagSoc", typeof(string));
|
||||
|
||||
var sessoParameter = sesso != null ?
|
||||
new ObjectParameter("Sesso", sesso) :
|
||||
new ObjectParameter("Sesso", typeof(string));
|
||||
|
||||
var pOBirthParameter = pOBirth != null ?
|
||||
new ObjectParameter("POBirth", pOBirth) :
|
||||
new ObjectParameter("POBirth", typeof(string));
|
||||
|
||||
var dOBirthParameter = dOBirth.HasValue ?
|
||||
new ObjectParameter("DOBirth", dOBirth) :
|
||||
new ObjectParameter("DOBirth", typeof(System.DateTime));
|
||||
|
||||
var p_ivaParameter = p_iva != null ?
|
||||
new ObjectParameter("P_iva", p_iva) :
|
||||
new ObjectParameter("P_iva", typeof(string));
|
||||
|
||||
var c_FiscParameter = c_Fisc != null ?
|
||||
new ObjectParameter("C_Fisc", c_Fisc) :
|
||||
new ObjectParameter("C_Fisc", typeof(string));
|
||||
|
||||
var viaParameter = via != null ?
|
||||
new ObjectParameter("Via", via) :
|
||||
new ObjectParameter("Via", typeof(string));
|
||||
|
||||
var localitaParameter = localita != null ?
|
||||
new ObjectParameter("Localita", localita) :
|
||||
new ObjectParameter("Localita", typeof(string));
|
||||
|
||||
var capParameter = cap != null ?
|
||||
new ObjectParameter("Cap", cap) :
|
||||
new ObjectParameter("Cap", typeof(string));
|
||||
|
||||
var provinciaParameter = provincia != null ?
|
||||
new ObjectParameter("Provincia", provincia) :
|
||||
new ObjectParameter("Provincia", typeof(string));
|
||||
|
||||
var pagamentoParameter = pagamento != null ?
|
||||
new ObjectParameter("Pagamento", pagamento) :
|
||||
new ObjectParameter("Pagamento", typeof(string));
|
||||
|
||||
var emailParameter = email != null ?
|
||||
new ObjectParameter("email", email) :
|
||||
new ObjectParameter("email", typeof(string));
|
||||
|
||||
var telParameter = tel != null ?
|
||||
new ObjectParameter("tel", tel) :
|
||||
new ObjectParameter("tel", typeof(string));
|
||||
|
||||
var noteParameter = note != null ?
|
||||
new ObjectParameter("Note", note) :
|
||||
new ObjectParameter("Note", typeof(string));
|
||||
|
||||
var idxGruppoParameter = idxGruppo != null ?
|
||||
new ObjectParameter("idxGruppo", idxGruppo) :
|
||||
new ObjectParameter("idxGruppo", typeof(string));
|
||||
|
||||
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_clienti_update", original_idxCliParameter, ragSocParameter, sessoParameter, pOBirthParameter, dOBirthParameter, p_ivaParameter, c_FiscParameter, viaParameter, localitaParameter, capParameter, provinciaParameter, pagamentoParameter, emailParameter, telParameter, noteParameter, idxGruppoParameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
<Property Name="Cap" Type="nvarchar" MaxLength="5" Nullable="false" />
|
||||
<Property Name="Provincia" Type="nvarchar" MaxLength="2" Nullable="false" />
|
||||
<Property Name="Pagamento" Type="nvarchar" MaxLength="250" Nullable="false" />
|
||||
<Property Name="email" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="tel" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="Note" Type="ntext" Nullable="false" />
|
||||
<Property Name="idxGruppo" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
</EntityType>
|
||||
@@ -137,6 +139,42 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'Me
|
||||
<Property Name="netto" Type="decimal" Precision="9" Scale="2" Nullable="false" />
|
||||
<Property Name="iva" Type="decimal" Precision="9" Scale="2" Nullable="false" />
|
||||
</EntityType>
|
||||
<Function Name="stp_clienti_delete" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="Original_idxCli" Type="int" Mode="In" />
|
||||
</Function>
|
||||
<Function Name="stp_clienti_insert" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="RagSoc" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Sesso" Type="char" Mode="In" />
|
||||
<Parameter Name="POBirth" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="DOBirth" Type="datetime" Mode="In" />
|
||||
<Parameter Name="P_iva" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="C_Fisc" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Via" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Localita" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Cap" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Provincia" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Pagamento" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Note" Type="ntext" Mode="In" />
|
||||
<Parameter Name="idxGruppo" Type="nvarchar" Mode="In" />
|
||||
</Function>
|
||||
<Function Name="stp_clienti_update" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="Original_idxCli" Type="int" Mode="In" />
|
||||
<Parameter Name="RagSoc" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Sesso" Type="char" Mode="In" />
|
||||
<Parameter Name="POBirth" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="DOBirth" Type="datetime" Mode="In" />
|
||||
<Parameter Name="P_iva" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="C_Fisc" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Via" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Localita" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Cap" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Provincia" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Pagamento" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="email" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="tel" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Note" Type="ntext" Mode="In" />
|
||||
<Parameter Name="idxGruppo" Type="nvarchar" Mode="In" />
|
||||
</Function>
|
||||
<Function Name="stp_docRows_deleteQuery" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="Original_id" Type="int" Mode="In" />
|
||||
</Function>
|
||||
@@ -251,6 +289,42 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'Me
|
||||
<Parameter Name="idxDoc" Mode="In" Type="Int32" />
|
||||
</FunctionImport>
|
||||
<EntitySet Name="Clienti" EntityType="MAPModel.Clienti" />
|
||||
<FunctionImport Name="stp_clienti_delete">
|
||||
<Parameter Name="Original_idxCli" Mode="In" Type="Int32" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="stp_clienti_insert">
|
||||
<Parameter Name="RagSoc" Mode="In" Type="String" />
|
||||
<Parameter Name="Sesso" Mode="In" Type="String" />
|
||||
<Parameter Name="POBirth" Mode="In" Type="String" />
|
||||
<Parameter Name="DOBirth" Mode="In" Type="DateTime" />
|
||||
<Parameter Name="P_iva" Mode="In" Type="String" />
|
||||
<Parameter Name="C_Fisc" Mode="In" Type="String" />
|
||||
<Parameter Name="Via" Mode="In" Type="String" />
|
||||
<Parameter Name="Localita" Mode="In" Type="String" />
|
||||
<Parameter Name="Cap" Mode="In" Type="String" />
|
||||
<Parameter Name="Provincia" Mode="In" Type="String" />
|
||||
<Parameter Name="Pagamento" Mode="In" Type="String" />
|
||||
<Parameter Name="Note" Mode="In" Type="String" />
|
||||
<Parameter Name="idxGruppo" Mode="In" Type="String" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="stp_clienti_update">
|
||||
<Parameter Name="Original_idxCli" Mode="In" Type="Int32" />
|
||||
<Parameter Name="RagSoc" Mode="In" Type="String" />
|
||||
<Parameter Name="Sesso" Mode="In" Type="String" />
|
||||
<Parameter Name="POBirth" Mode="In" Type="String" />
|
||||
<Parameter Name="DOBirth" Mode="In" Type="DateTime" />
|
||||
<Parameter Name="P_iva" Mode="In" Type="String" />
|
||||
<Parameter Name="C_Fisc" Mode="In" Type="String" />
|
||||
<Parameter Name="Via" Mode="In" Type="String" />
|
||||
<Parameter Name="Localita" Mode="In" Type="String" />
|
||||
<Parameter Name="Cap" Mode="In" Type="String" />
|
||||
<Parameter Name="Provincia" Mode="In" Type="String" />
|
||||
<Parameter Name="Pagamento" Mode="In" Type="String" />
|
||||
<Parameter Name="email" Mode="In" Type="String" />
|
||||
<Parameter Name="tel" Mode="In" Type="String" />
|
||||
<Parameter Name="Note" Mode="In" Type="String" />
|
||||
<Parameter Name="idxGruppo" Mode="In" Type="String" />
|
||||
</FunctionImport>
|
||||
</EntityContainer>
|
||||
<EntityType Name="Documenti">
|
||||
<Key>
|
||||
@@ -391,6 +465,8 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'Me
|
||||
<Property Name="Pagamento" Type="String" Nullable="false" MaxLength="250" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Note" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="idxGruppo" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="email" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="tel" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
@@ -484,6 +560,8 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'Me
|
||||
<EntitySetMapping Name="Clienti">
|
||||
<EntityTypeMapping TypeName="MAPModel.Clienti">
|
||||
<MappingFragment StoreEntitySet="Clienti">
|
||||
<ScalarProperty Name="tel" ColumnName="tel" />
|
||||
<ScalarProperty Name="email" ColumnName="email" />
|
||||
<ScalarProperty Name="idxGruppo" ColumnName="idxGruppo" />
|
||||
<ScalarProperty Name="Note" ColumnName="Note" />
|
||||
<ScalarProperty Name="Pagamento" ColumnName="Pagamento" />
|
||||
@@ -501,6 +579,9 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'Me
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<FunctionImportMapping FunctionImportName="stp_clienti_delete" FunctionName="MAPModel.Store.stp_clienti_delete" />
|
||||
<FunctionImportMapping FunctionImportName="stp_clienti_insert" FunctionName="MAPModel.Store.stp_clienti_insert" />
|
||||
<FunctionImportMapping FunctionImportName="stp_clienti_update" FunctionName="MAPModel.Store.stp_clienti_update" />
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
|
||||
@@ -28,5 +28,7 @@ namespace MedAP_data
|
||||
public string Pagamento { get; set; }
|
||||
public string Note { get; set; }
|
||||
public string idxGruppo { get; set; }
|
||||
public string email { get; set; }
|
||||
public string tel { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
+78
-25
@@ -16,13 +16,16 @@ namespace MedAP_data
|
||||
/// </summary>
|
||||
static MAPEntities ctx = new MAPEntities();
|
||||
|
||||
|
||||
#region funzioni Clienti
|
||||
|
||||
/// <summary>
|
||||
/// elenco completo CLIENTI
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<Clienti> ElencoClienti()
|
||||
public static IEnumerable<Clienti> Clienti()
|
||||
{
|
||||
return ElencoClienti("", 0, 10);
|
||||
return Clienti("", 0, 10);
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco filtrato da parametro ricerca
|
||||
@@ -31,7 +34,7 @@ namespace MedAP_data
|
||||
/// <param name="startRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<Clienti> ElencoClienti(string searchMe, int startRowIndex, int maximumRows)
|
||||
public static IEnumerable<Clienti> Clienti(string searchMe, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Clienti> query;
|
||||
if (searchMe != "" && searchMe != null)
|
||||
@@ -52,7 +55,7 @@ namespace MedAP_data
|
||||
/// <param name="startRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static int ElencoClientiCount(string searchMe, int startRowIndex, int maximumRows)
|
||||
public static int ClientiCount(string searchMe, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Clienti> query;
|
||||
if (searchMe != "" && searchMe != null)
|
||||
@@ -65,6 +68,57 @@ namespace MedAP_data
|
||||
}
|
||||
return query.Count();
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce cliente specifico
|
||||
/// </summary>
|
||||
/// <param name="idxCli"></param>
|
||||
/// <returns></returns>
|
||||
public static Clienti ClienteSel(int idxCli)
|
||||
{
|
||||
IQueryable<Clienti> query;
|
||||
query = ctx.Clienti.Where(s => s.idxCli == idxCli);
|
||||
var result = from r in query select r;
|
||||
return result.FirstOrDefault();
|
||||
}
|
||||
/// <summary>
|
||||
/// Add record CLIENTI
|
||||
/// </summary>
|
||||
/// <param name="rigaCli"></param>
|
||||
public static void ClientiInsert(Clienti rigaCli)
|
||||
{
|
||||
// imposto parametri opzionali...
|
||||
rigaCli.Pagamento = "";
|
||||
rigaCli.idxGruppo = "";
|
||||
ctx.Clienti.Add(rigaCli);
|
||||
ctx.SaveChanges();
|
||||
}
|
||||
/// <summary>
|
||||
/// Update record CLIENTI
|
||||
/// </summary>
|
||||
/// <param name="rigaCli"></param>
|
||||
public static void ClientiUpdate(Clienti rigaCli)
|
||||
{
|
||||
rigaCli.Pagamento = "";
|
||||
rigaCli.idxGruppo = "";
|
||||
ctx.stp_clienti_update(rigaCli.idxCli, rigaCli.RagSoc, rigaCli.Sesso, rigaCli.POBirth, rigaCli.DOBirth, rigaCli.P_iva, rigaCli.C_Fisc, rigaCli.Via, rigaCli.Località, rigaCli.Cap, rigaCli.Provincia, rigaCli.Pagamento, rigaCli.email, rigaCli.tel, rigaCli.Note, rigaCli.idxGruppo);
|
||||
// refresh EF context
|
||||
((IObjectContextAdapter)ctx).ObjectContext.Refresh(RefreshMode.StoreWins, ctx.Clienti);
|
||||
}
|
||||
/// <summary>
|
||||
/// Delete record CLIENTI
|
||||
/// </summary>
|
||||
/// <param name="rigaCli"></param>
|
||||
public static void ClientiDelete(Clienti rigaCli)
|
||||
{
|
||||
ctx.stp_clienti_delete(rigaCli.idxCli);
|
||||
// refresh EF context
|
||||
((IObjectContextAdapter)ctx).ObjectContext.Refresh(RefreshMode.StoreWins, ctx.Clienti);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region funzioni TEMPLATE
|
||||
|
||||
/// <summary>
|
||||
/// elenco completo
|
||||
@@ -85,13 +139,17 @@ namespace MedAP_data
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region funzioni Documenti
|
||||
|
||||
/// <summary>
|
||||
/// elenco completo DOCUMENTI
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<Documenti> ElencoDocumenti()
|
||||
public static IEnumerable<Documenti> Documenti()
|
||||
{
|
||||
return ElencoDocumenti("", 0, 10);
|
||||
return Documenti("", 0, 10);
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco filtrato da parametro ricerca
|
||||
@@ -100,7 +158,7 @@ namespace MedAP_data
|
||||
/// <param name="startRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<Documenti> ElencoDocumenti(string searchMe, int startRowIndex, int maximumRows)
|
||||
public static IEnumerable<Documenti> Documenti(string searchMe, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Documenti> query;
|
||||
if (searchMe != "" && searchMe != null)
|
||||
@@ -121,7 +179,7 @@ namespace MedAP_data
|
||||
/// <param name="startRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static int ElencoDocumentiCount(string searchMe, int startRowIndex, int maximumRows)
|
||||
public static int DocumentiCount(string searchMe, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Documenti> query;
|
||||
if (searchMe != "" && searchMe != null)
|
||||
@@ -135,6 +193,10 @@ namespace MedAP_data
|
||||
return query.Count();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region funzioni RigheDoc
|
||||
|
||||
/// <summary>
|
||||
/// elenco completo RIGHE FATTURE
|
||||
/// </summary>
|
||||
@@ -184,9 +246,6 @@ namespace MedAP_data
|
||||
}
|
||||
return query.Count();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Add record RIGHE FATTURE
|
||||
/// </summary>
|
||||
@@ -203,17 +262,9 @@ namespace MedAP_data
|
||||
public static void RigheDocUpdate(RigheDoc rigaFatt)
|
||||
{
|
||||
ctx.stp_docRows_updateQuery(rigaFatt.IdxRigheFatt, rigaFatt.Descrizione, rigaFatt.um, rigaFatt.prezzoUm, rigaFatt.qta, rigaFatt.sconto, rigaFatt.c_iva);
|
||||
ctx.SaveChanges();
|
||||
//var result = from r in ctx.RigheDoc where r.IdxRigheFatt == rigaFatt.IdxRigheFatt select r;
|
||||
//result.FirstOrDefault().c_iva = rigaFatt.c_iva;
|
||||
//result.FirstOrDefault().Descrizione = rigaFatt.Descrizione;
|
||||
//result.FirstOrDefault().prezzoUm = rigaFatt.prezzoUm;
|
||||
//result.FirstOrDefault().qta = rigaFatt.qta;
|
||||
//result.FirstOrDefault().sconto = rigaFatt.sconto;
|
||||
//result.FirstOrDefault().um = rigaFatt.um;
|
||||
//ctx.SaveChanges();
|
||||
var Context = ((IObjectContextAdapter)ctx).ObjectContext;
|
||||
Context.Refresh(RefreshMode.StoreWins,ctx.RigheDoc);
|
||||
// refresh EF context
|
||||
((IObjectContextAdapter)ctx).ObjectContext.Refresh(RefreshMode.StoreWins, ctx.Documenti);
|
||||
((IObjectContextAdapter)ctx).ObjectContext.Refresh(RefreshMode.StoreWins, ctx.RigheDoc);
|
||||
}
|
||||
/// <summary>
|
||||
/// Delete record RIGHE FATTURE
|
||||
@@ -221,11 +272,13 @@ namespace MedAP_data
|
||||
/// <param name="rigaFatt"></param>
|
||||
public static void RigheDocDelete(RigheDoc rigaFatt)
|
||||
{
|
||||
//var result = from r in ctx.RigheDoc where r.IdxRigheFatt == rigaFatt.IdxRigheFatt select r;
|
||||
//ctx.RigheDoc.Remove(result.FirstOrDefault());
|
||||
ctx.stp_docRows_deleteQuery(rigaFatt.IdxRigheFatt);
|
||||
ctx.SaveChanges();
|
||||
// refresh EF context
|
||||
((IObjectContextAdapter)ctx).ObjectContext.Refresh(RefreshMode.StoreWins, ctx.Documenti);
|
||||
((IObjectContextAdapter)ctx).ObjectContext.Refresh(RefreshMode.StoreWins, ctx.RigheDoc);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,6 +21,42 @@
|
||||
<Parameter Name="idxDoc" Mode="In" Type="Int32" />
|
||||
</FunctionImport>
|
||||
<EntitySet Name="Clienti" EntityType="MAPModel.Clienti" />
|
||||
<FunctionImport Name="stp_clienti_delete">
|
||||
<Parameter Name="Original_idxCli" Mode="In" Type="Int32" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="stp_clienti_insert">
|
||||
<Parameter Name="RagSoc" Mode="In" Type="String" />
|
||||
<Parameter Name="Sesso" Mode="In" Type="String" />
|
||||
<Parameter Name="POBirth" Mode="In" Type="String" />
|
||||
<Parameter Name="DOBirth" Mode="In" Type="DateTime" />
|
||||
<Parameter Name="P_iva" Mode="In" Type="String" />
|
||||
<Parameter Name="C_Fisc" Mode="In" Type="String" />
|
||||
<Parameter Name="Via" Mode="In" Type="String" />
|
||||
<Parameter Name="Localita" Mode="In" Type="String" />
|
||||
<Parameter Name="Cap" Mode="In" Type="String" />
|
||||
<Parameter Name="Provincia" Mode="In" Type="String" />
|
||||
<Parameter Name="Pagamento" Mode="In" Type="String" />
|
||||
<Parameter Name="Note" Mode="In" Type="String" />
|
||||
<Parameter Name="idxGruppo" Mode="In" Type="String" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="stp_clienti_update">
|
||||
<Parameter Name="Original_idxCli" Mode="In" Type="Int32" />
|
||||
<Parameter Name="RagSoc" Mode="In" Type="String" />
|
||||
<Parameter Name="Sesso" Mode="In" Type="String" />
|
||||
<Parameter Name="POBirth" Mode="In" Type="String" />
|
||||
<Parameter Name="DOBirth" Mode="In" Type="DateTime" />
|
||||
<Parameter Name="P_iva" Mode="In" Type="String" />
|
||||
<Parameter Name="C_Fisc" Mode="In" Type="String" />
|
||||
<Parameter Name="Via" Mode="In" Type="String" />
|
||||
<Parameter Name="Localita" Mode="In" Type="String" />
|
||||
<Parameter Name="Cap" Mode="In" Type="String" />
|
||||
<Parameter Name="Provincia" Mode="In" Type="String" />
|
||||
<Parameter Name="Pagamento" Mode="In" Type="String" />
|
||||
<Parameter Name="email" Mode="In" Type="String" />
|
||||
<Parameter Name="tel" Mode="In" Type="String" />
|
||||
<Parameter Name="Note" Mode="In" Type="String" />
|
||||
<Parameter Name="idxGruppo" Mode="In" Type="String" />
|
||||
</FunctionImport>
|
||||
</EntityContainer>
|
||||
<EntityType Name="Documenti">
|
||||
<Key>
|
||||
@@ -161,5 +197,7 @@
|
||||
<Property Name="Pagamento" Type="String" Nullable="false" MaxLength="250" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Note" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="idxGruppo" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="email" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="tel" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
@@ -86,6 +86,8 @@
|
||||
<EntitySetMapping Name="Clienti">
|
||||
<EntityTypeMapping TypeName="MAPModel.Clienti">
|
||||
<MappingFragment StoreEntitySet="Clienti">
|
||||
<ScalarProperty Name="tel" ColumnName="tel" />
|
||||
<ScalarProperty Name="email" ColumnName="email" />
|
||||
<ScalarProperty Name="idxGruppo" ColumnName="idxGruppo" />
|
||||
<ScalarProperty Name="Note" ColumnName="Note" />
|
||||
<ScalarProperty Name="Pagamento" ColumnName="Pagamento" />
|
||||
@@ -103,5 +105,8 @@
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<FunctionImportMapping FunctionImportName="stp_clienti_delete" FunctionName="MAPModel.Store.stp_clienti_delete" />
|
||||
<FunctionImportMapping FunctionImportName="stp_clienti_insert" FunctionName="MAPModel.Store.stp_clienti_insert" />
|
||||
<FunctionImportMapping FunctionImportName="stp_clienti_update" FunctionName="MAPModel.Store.stp_clienti_update" />
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
@@ -16,6 +16,8 @@
|
||||
<Property Name="Cap" Type="nvarchar" MaxLength="5" Nullable="false" />
|
||||
<Property Name="Provincia" Type="nvarchar" MaxLength="2" Nullable="false" />
|
||||
<Property Name="Pagamento" Type="nvarchar" MaxLength="250" Nullable="false" />
|
||||
<Property Name="email" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="tel" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="Note" Type="ntext" Nullable="false" />
|
||||
<Property Name="idxGruppo" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
</EntityType>
|
||||
@@ -132,6 +134,42 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'Me
|
||||
<Property Name="netto" Type="decimal" Precision="9" Scale="2" Nullable="false" />
|
||||
<Property Name="iva" Type="decimal" Precision="9" Scale="2" Nullable="false" />
|
||||
</EntityType>
|
||||
<Function Name="stp_clienti_delete" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="Original_idxCli" Type="int" Mode="In" />
|
||||
</Function>
|
||||
<Function Name="stp_clienti_insert" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="RagSoc" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Sesso" Type="char" Mode="In" />
|
||||
<Parameter Name="POBirth" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="DOBirth" Type="datetime" Mode="In" />
|
||||
<Parameter Name="P_iva" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="C_Fisc" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Via" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Localita" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Cap" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Provincia" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Pagamento" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Note" Type="ntext" Mode="In" />
|
||||
<Parameter Name="idxGruppo" Type="nvarchar" Mode="In" />
|
||||
</Function>
|
||||
<Function Name="stp_clienti_update" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="Original_idxCli" Type="int" Mode="In" />
|
||||
<Parameter Name="RagSoc" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Sesso" Type="char" Mode="In" />
|
||||
<Parameter Name="POBirth" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="DOBirth" Type="datetime" Mode="In" />
|
||||
<Parameter Name="P_iva" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="C_Fisc" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Via" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Localita" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Cap" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Provincia" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Pagamento" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="email" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="tel" Type="nvarchar" Mode="In" />
|
||||
<Parameter Name="Note" Type="ntext" Mode="In" />
|
||||
<Parameter Name="idxGruppo" Type="nvarchar" Mode="In" />
|
||||
</Function>
|
||||
<Function Name="stp_docRows_deleteQuery" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
|
||||
<Parameter Name="Original_id" Type="int" Mode="In" />
|
||||
</Function>
|
||||
|
||||
Reference in New Issue
Block a user