Hola alguien tendrá manuales o documentación de .Net Core 1.1 y 2.0
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
<dx:ASPxGridView ID="GridViewTransaction" runat="server" AutoGenerateColumns="false" OnCellEditorInitialize="GridViewTransaction_CellEditorInitialize" onini>
<Columns>
<dx:GridViewDataColumn FieldName="OidCCOrigin" Visible="false"></dx:GridViewDataColumn>
<dx:GridViewDataColumn FieldName="CenterCostOrigin" Caption="Centro de Costo"></dx:GridViewDataColumn>
<dx:GridViewDataColumn FieldName="OidAccount" Visible="false"></dx:GridViewDataColumn>
<dx:GridViewDataColumn FieldName="Account" Caption="Cuenta"></dx:GridViewDataColumn>
<dx:GridViewDataDateColumn FieldName="DateTransaction" Caption="Fecha Transacción"></dx:GridViewDataDateColumn>
<dx:GridViewDataColumn FieldName="Amount" Caption="Cantidad"></dx:GridViewDataColumn>
<dx:GridViewDataColumn FieldName="UnitPrice" Caption="Precio Unitario"></dx:GridViewDataColumn>
<dx:GridViewDataColumn FieldName="Total" Caption="Total"></dx:GridViewDataColumn>
<dx:GridViewDataTextColumn Caption="Centro Costo Destino">
<DataItemTemplate>
<dx:ASPxComboBox ID="cmbCCDestination" runat="server" ValueType="System.Guid" ValueField="Oid"></dx:ASPxComboBox>
</DataItemTemplate>
</dx:GridViewDataTextColumn>
</Columns>
</dx:ASPxGridView>
protected void searchTransaction_Click(object sender, EventArgs e)
{
if (ReferenceEquals(cmbCC.Value, null) &&
ReferenceEquals(cmbCta.Value, null) &&
ReferenceEquals(cmbPeriod.Value, null))
{
GridViewTransaction.DataSource = this._objectSpace.GetObjects<CostCenter.Module.BusinessObjects.Transaction>()
.Select(s =>
new
{
OidCCOrigin = s.CenterCost.Oid,
CenterCostOrigin = s.CenterCost.Name,
OidAccount = s.Account.Oid,
Account = s.Account.Description,
DateTransaction = s.TransactionDate,
Amount = s.Qty,
UnitPrice = s.UnitPrice,
Total = s.Total
}).OrderBy(o => o.DateTransaction);
GridViewTransaction.DataBind();
}
}
string url = ConfigurationManager.AppSettings.Get("url");
CookieContainer myCookie = new CookieContainer();
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.CookieContainer = myCookie;
request.Method = "GET";
request.KeepAlive = false;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream, Encoding.UTF8);
string src = reader.ReadToEnd();
//Get ViewState
string VSFlag = "id=\"__VIEWSTATE\" value=\"";
int i = src.IndexOf(VSFlag) + VSFlag.Length;
int j = src.IndexOf("\"", i);
string viewState = src.Substring(i, j - i);
//Get ViewStateGenerator
string VSGenF = "id=\"__VIEWSTATEGENERATOR\" value=\"";
i = src.IndexOf(VSGenF) + VSGenF.Length;
j = src.IndexOf("\"", i);
string viewStateGenerator = src.Substring(i, j - i);
//Event Validation
string eventValidationF = "id=\"__EVENTVALIDATION\" value=\"";
i = src.IndexOf(eventValidationF) + eventValidationF.Length;
j = src.IndexOf("\"", i);
string eventValidation = src.Substring(i, j - i);
string submit = "Sign In";
string user = ConfigurationManager.AppSettings.Get("user");
string password = ConfigurationManager.AppSettings.Get("pass");
viewState = HttpUtility.UrlEncode(viewState);
eventValidation = HttpUtility.UrlEncode(eventValidation);
viewStateGenerator = HttpUtility.UrlEncode(viewStateGenerator);
submit = HttpUtility.UrlEncode(submit);
user = HttpUtility.UrlEncode(user);
password = HttpUtility.UrlEncode(password);
string strPost = "POSTDATA=__LASTFOCUS=&__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE={0}"
+ "&__VIEWSTATEGENERATOR={1}&__EVENTVALIDATION={2}&ctl00%24PlaceHolderMain%24signInControl%24UserName={3}"
+ "&ctl00%24PlaceHolderMain%24signInControl%24password={4}&ctl00%24PlaceHolderMain%24signInControl%24login={5}";
string postStr = string.Format(strPost, viewState, viewStateGenerator, eventValidation, user, password, submit);
byte[] postData = Encoding.ASCII.GetBytes(postStr);
request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "POST";
request.Referer = url;
request.KeepAlive = true;
request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0";
request.ContentType = "application/x-www-form-urlencoded";
request.CookieContainer = myCookie;
Cookie ck = new Cookie("SworkCookie", string.Empty);
ck.Domain = request.RequestUri.Host;
request.CookieContainer.Add(ck);
request.CookieContainer.Add(response.Cookies);
request.CookieContainer = myCookie;
request.ContentLength = postData.Length;
//------------
//submit
Stream outputStream = request.GetRequestStream();
outputStream.Write(postData, 0, postData.Length);
outputStream.Close();
//accept
response = request.GetResponse() as HttpWebResponse;
responseStream = response.GetResponseStream();
reader = new StreamReader(responseStream, Encoding.UTF8);
string srcString = reader.ReadToEnd();