public ActionResult generateContract() { int memberID = 0; TAccreditationAbonent acredAbonent = new TAccreditationAbonent(); TPersonAccrediataion acredPerson = new TPersonAccrediataion(); TPersonAccrediataion[] personList = new TPersonAccrediataion[0]; TDocumentsList[] docList = new TDocumentsList[0]; client.TAuthHeaderValue = new TAuthHeader(); client.GetAccredMemberInfo((string)Session["sessionID"], (string)Session["sessionKey"], memberID, ref acredAbonent, ref acredPerson, ref personList, ref docList); string personAddInfo = ""; string personSign = ""; client.GetButbPersonForSigned(ref personSign, ref personAddInfo); //generate the dictionary for pasting to the template Dictionary<string, string> dict = new Dictionary<string, string>(); dict.Add("contractnumber", ""); dict.Add("date", DateTime.Now.ToString("dd.MM.yyyy")); dict.Add("personsign", personSign); dict.Add("personaddinfo", personAddInfo); dict.Add("fullname", ((CertInfo)Session["certInfo"]).OrganizationOwner); dict.Add("personofficepostgenitive", acredPerson.Person_Name_Officepost_Genitive); dict.Add("personnamegenitive", acredPerson.Person_Name_Genitive); dict.Add("personbasedocgenitive", acredPerson.Person_Name_Base_Doc_Genitive); dict.Add("personnumberbasedoc", acredPerson.Pperson_Number_Base_Doc); dict.Add("personorganbasedoc", acredPerson.Person_Organ_Base_Doc); dict.Add("persondatebegindoc", DateTimeUtils.DoubleToDateTime(acredPerson.Person_Date_Begin_Doc).ToString("dd.MM.yyyy")); dict.Add("address", ((CertInfo)Session["certInfo"]).StreetOwner); dict.Add("accountnumber", acredAbonent.AccountNumber); dict.Add("bankname", acredAbonent.BankNAme); dict.Add("bankcode", acredAbonent.BankCode); dict.Add("bankaddress", acredAbonent.BankAddress); dict.Add("unp", ((CertInfo)Session["certInfo"]).UNP); dict.Add("okpo", acredAbonent.Okpo); String genDoc = TemplatesUtils.generateRTF(Server.MapPath("~") + "/Content/static/contract.rtf", dict); return Json(genDoc); }
public ActionResult ListAcred() { TAccreditationAbonent acredAbonent = new TAccreditationAbonent(); TPersonAccrediataion acredPerson = new TPersonAccrediataion(); TPersonAccrediataion[] personList = new TPersonAccrediataion[0]; TDocumentsList[] docList = new TDocumentsList[0]; TViewSummary view = new TViewSummary(); Member member = new Member(); Person[] aPersonList = null; DocumentsList[] adocList = null; int memberID = 0; if (Session["hasLogged"] == null) { Session["hasLogged"] = false; } if ((bool)Session["hasLogged"]) { client.TAuthHeaderValue = new TAuthHeader(); client.GetAccredMemberInfo((string)Session["sessionID"], (string)Session["sessionKey"], memberID, ref acredAbonent, ref acredPerson, ref personList, ref docList); member.FIdTypeMember = acredAbonent.TIdypeMember; member.FTypeMember = acredAbonent.TypeMember; member.FMemberCode = acredAbonent.MemberCode; member.FFullNameMember = ((CertInfo)Session["certInfo"]).OrganizationOwner; member.FShortNameMember = ((CertInfo)Session["certInfo"]).CNOwner; member.FUnp = ((CertInfo)Session["certInfo"]).UNP; member.FOkpo = acredAbonent.Okpo; member.FOkogu = acredAbonent.Okogu; member.FIDOkogu = acredAbonent.IdOKOGU; member.FOrgGovermentFin = acredAbonent.OrgGovermentFin; member.FOrgLegalForm = acredAbonent.OrgLegalForm; member.FIdOrgLegalForm = acredAbonent.IdOrgLegalForm; member.FCountry = ((CertInfo)Session["certInfo"]).CountryOwner; member.FRegion = ((CertInfo)Session["certInfo"]).Area; member.FCity = ((CertInfo)Session["certInfo"]).LocalityOwner; member.FAddress = ((CertInfo)Session["certInfo"]).StreetOwner; member.FIdBank = acredAbonent.IdBank; member.FBankAccount = acredAbonent.AccountNumber; member.FBankCode = acredAbonent.BankCode; member.FBankName = acredAbonent.BankNAme; member.FBankAddress = acredAbonent.BankAddress; member.FBossSecondName = acredAbonent.BossLastName; member.FBossOtherName = acredAbonent.BossFirstName + " " + acredAbonent.BossSecondName; member.FBossPost = acredAbonent.BossPost; member.FFax = acredAbonent.Fax; member.FEMail = acredAbonent.Email; member.FSite = acredAbonent.WwwSite; member.FPhone = acredAbonent.MemberPhone; member.FMemberStatus = (string)Session["memberStatus"]; member.FPersonLastName = acredPerson.Person_last_name; member.FPersonName = acredPerson.Person_name; member.FPersonNameGenitive = acredPerson.Person_Name_Genitive; member.FPersonDataFromBaseDoc = acredPerson.Person_Data_From_Base_Doc; member.FPersonIdBaseDoc = acredPerson.Person_Id_Base_Doc; member.FPersonNameOfficepost = acredPerson.Person_Name_Officepost; member.FPersonNameOfficepostGenitive = acredPerson.Person_Name_Officepost_Genitive; member.FPersonNameBaseDocGetnitive = acredPerson.Person_Name_Base_Doc_Genitive; member.FPersonNumberBaseDoc = acredPerson.Pperson_Number_Base_Doc; member.FPersonOrganBaseDoc = acredPerson.Person_Organ_Base_Doc; member.FPersonDateBeginDoc = DateTimeUtils.DoubleToDateTime(acredPerson.Person_Date_Begin_Doc).ToString("dd.MM.yyyy"); member.FPersonMail = acredPerson.Person_Mail; member.FPersonPhone = acredPerson.Person_Phone; aPersonList = new Person[personList.Length]; for (int i = 0; i < personList.Length; i++) { Person person = new Person(); person.FIdPerson = personList[i].Id_Person; person.FPK = personList[i].Pk; person.FNumPerson = personList[i].NumPerson.ToString(); person.FPersonLastName = personList[i].Person_last_name; person.FPersonName = personList[i].Person_name; person.FPersonNameGenitive = personList[i].Person_Name_Genitive; person.FPersonDataFromBaseDoc = personList[i].Person_Data_From_Base_Doc; person.FPersonNameOfficepost = personList[i].Person_Name_Officepost; person.FPersonNameOfficepostGenitive = personList[i].Person_Name_Officepost_Genitive; person.FPersonNumberBaseDoc = personList[i].Pperson_Number_Base_Doc; person.FPersonIdBaseDoc= personList[i].Person_Id_Base_Doc.ToString(); person.FPersonOrganBaseDoc = personList[i].Person_Organ_Base_Doc; person.FPersonDateBeginDoc = DateTimeUtils.DoubleToDateTimeToString(personList[i].Person_Date_Begin_Doc, "dd.MM.yyyy"); person.FPersonDateEndDoc = DateTimeUtils.DoubleToDateTimeToString(personList[i].Person_Date_End_Doc, "dd.MM.yyyy"); person.FPersonMail = personList[i].Person_Mail; person.FPersonPhone = personList[i].Person_Phone; aPersonList[i] = person; } adocList = new DocumentsList[docList.Length]; for (int i = 0; i < docList.Length; i++) { DocumentsList adoc = new DocumentsList(); adoc.FRowNUM = docList[i].RowNUM.ToString(); adoc.FIdDocument = docList[i].Id_Document.ToString(); adoc.FIdMember = docList[i].Id_Member.ToString(); adoc.FTypeDocument = docList[i].Type_Document; adoc.FFileName = docList[i].File_Name; adoc.FDOn = DateTimeUtils.DoubleToDateTimeToString(docList[i].D_On, "dd.MM.yyyy"); adoc.FDg1 = docList[i].Dg1.ToString(); adoc.FRole = docList[i].Role; adocList[i] = adoc; } } else { if (Session["errCode"] == null) { Session["errCode"] = c_Err_MmbrNoFnd_UsrNoFnd; } switch ((string)Session["errCode"]) { case c_Err_MmbrNoFnd_UsrNoFnd: { member.FTypeMember = ""; member.FMemberCode = ""; member.FFullNameMember = ((CertInfo)Session["certInfo"]).OrganizationOwner; member.FShortNameMember = ((CertInfo)Session["certInfo"]).CNOwner; member.FUnp = ((CertInfo)Session["certInfo"]).UNP; member.FOkpo = ""; member.FOkogu = ""; member.FOrgGovermentFin = 0; member.FOrgLegalForm = ""; member.FCountry = ((CertInfo)Session["certInfo"]).CountryOwner; member.FRegion = ((CertInfo)Session["certInfo"]).Area; member.FCity = ((CertInfo)Session["certInfo"]).LocalityOwner; member.FAddress = ((CertInfo)Session["certInfo"]).StreetOwner; member.FBankAccount = ""; member.FBankCode = ""; member.FBankName = ""; member.FBankAddress = ""; member.FBossSecondName = ""; member.FBossOtherName = ""; member.FBossPost = ""; member.FFax = ""; member.FEMail = ""; member.FSite = ""; member.FPhone = ""; member.FPersonLastName = ((CertInfo)Session["certInfo"]).SurnameOwner; member.FPersonName = ((CertInfo)Session["certInfo"]).NameAndMiddleName; member.FPersonNameGenitive = ""; member.FPersonDataFromBaseDoc = ((CertInfo)Session["certInfo"]).PassportData; member.FPersonNameOfficepost = ((CertInfo)Session["certInfo"]).Post; member.FPersonNameOfficepostGenitive = ""; member.FPersonNameBaseDocGetnitive = ""; member.FPersonNumberBaseDoc = ""; member.FPersonOrganBaseDoc = ""; member.FPersonDateBeginDoc = "";// DateTime.Now.ToString("dd.MM.yyyy"); member.FPersonMail = ((CertInfo)Session["certInfo"]).EmailPublisher; member.FPersonPhone = ""; break; } case c_Err_MmbrFnd_UsrNoFnd: { break; } case c_Err_MmbrFnd_UsrFnd_NoReg: { break; } } /* client.GetMemberID(((CertInfo)Session["certInfo"]).OrganizationOwner, ((CertInfo)Session["certInfo"]).CNOwner, ((CertInfo)Session["certInfo"]).UNP, ((CertInfo)Session["certInfo"]).CountryOwner, ((CertInfo)Session["certInfo"]).Area, ((CertInfo)Session["certInfo"]).LocalityOwner, ref memberID); client.TAuthHeaderValue = new TAuthHeader(); client.GetAccredMemberInfo("", "", memberID, ref acredAbonent, ref acredPerson, ref personList, ref docList); member.FTypeMember = acredAbonent.TypeMember; member.FMemberCode = acredAbonent.MemberCode; member.FFullNameMember = "";// ((CertInfo)Session["certInfo"]).CNOwner; member.FShortNameMember = "";// ((CertInfo)Session["certInfo"]).SurnameOwner; member.FUnp = "";// ((CertInfo)Session["certInfo"]).UNP; member.FOkpo = acredAbonent.Okpo; member.FOkogu = acredAbonent.Okogu; //member.FOrgGovermentFin = member.FOrgLegalForm = acredAbonent.OrgLegalForm; member.FCountry = "";//((CertInfo)Session["certInfo"]).CountryOwner; member.FRegion = "";// ((CertInfo)Session["certInfo"]). member.FCity = ""; // acredAbonent.City; member.FAdress = "";// ((CertInfo)Session["certInfo"]).StreetOwner; member.FBankAccount = acredAbonent.AccountNumber; member.FBankCode = acredAbonent.BankCode; member.FBankName = acredAbonent.BankNAme; member.FBankAddress = acredAbonent.BankAddress; member.FBossSecondName = acredAbonent.BossLastName; member.FBossOtherName = acredAbonent.BossFirstName + " " + acredAbonent.BossSecondName; member.FBossPost = acredAbonent.BossPost; member.FFax = acredAbonent.Fax; member.FEMail = acredAbonent.Email; member.FSite = acredAbonent.WwwSite; member.FPhone = acredAbonent.MemberPhone; member.FPersonLastName = acredPerson.Person_last_name; member.FPersonName = acredPerson.Person_name; member.FPersonNameGenitive = acredPerson.Person_Name_Genitive; member.FPersonDataFromBaseDoc = acredPerson.Person_Data_From_Base_Doc; member.FPersonNameOfficepost = acredPerson.Person_Name_Officepost; member.FPersonNameOfficepostGenitive = acredPerson.Person_Name_Officepost_Genitive; member.FPersonNameBaseDocGetnitive = acredPerson.Person_Name_Base_Doc_Genitive; member.FPersonNumberBaseDoc = acredPerson.Pperson_Number_Base_Doc; member.FPersonOrganBaseDoc = acredPerson.Person_Organ_Base_Doc; member.FPersonDateBeginDoc = DateTimeUtils.DoubleToDateTime(acredPerson.Person_Date_Begin_Doc).ToString("dd.MM.yyyy"); member.FPersonMail = acredPerson.Person_Mail; member.FPersonPhone = acredPerson.Person_Phone; aPersonList = new Person[personList.Length]; for (int i = 0; i < personList.Length; i++) { Person person = new Person(); person.FIdPerson = personList[i].Id_Person; person.FPK = personList[i].Pk; person.FNumPerson = personList[i].NumPerson.ToString(); person.FPersonLastName = personList[i].Person_last_name; person.FPersonName = personList[i].Person_name; person.FPersonNameGenitive = personList[i].Person_Name_Genitive; person.FPersonDataFromBaseDoc = personList[i].Person_Data_From_Base_Doc; person.FPersonNameOfficepost = personList[i].Person_Name_Officepost; person.FPersonNameOfficepostGenitive = personList[i].Person_Name_Officepost_Genitive; person.FPersonNumberBaseDoc = personList[i].Pperson_Number_Base_Doc; person.FPersonOrganBaseDoc = personList[i].Person_Organ_Base_Doc; person.FPersonDateBeginDoc = DateTimeUtils.DoubleToDateTime(personList[i].Person_Date_Begin_Doc).ToString("dd.MM.yyyy"); person.FPersonDateEndDoc = DateTimeUtils.DoubleToDateTime(personList[i].Person_Date_End_Doc).ToString("dd.MM.yyyy"); person.FPersonMail = personList[i].Person_Mail; person.FPersonPhone = personList[i].Person_Phone; aPersonList[i] = person; } */ } Acred acred = new Acred(); acred.adocList = adocList; acred.aMember = member; acred.aPersonList = aPersonList; return Json(acred); }
public ActionResult generateStatements(int typemember) { int memberID = 0; TAccreditationAbonent acredAbonent = new TAccreditationAbonent(); TPersonAccrediataion acredPerson = new TPersonAccrediataion(); TPersonAccrediataion[] personList = new TPersonAccrediataion[0]; TDocumentsList[] docList = new TDocumentsList[0]; client.TAuthHeaderValue = new TAuthHeader(); client.GetAccredMemberInfo((string)Session["sessionID"], (string)Session["sessionKey"], memberID, ref acredAbonent, ref acredPerson, ref personList, ref docList); //generate the dictionary for pasting to the template Dictionary<string, string> dict = new Dictionary<string, string>(); dict.Add("fio", ((CertInfo)Session["certInfo"]).SurnameOwner + " " + ((CertInfo)Session["certInfo"]).NameAndMiddleName); dict.Add("country", ((CertInfo)Session["certInfo"]).CountryOwner); dict.Add("region", ((CertInfo)Session["certInfo"]).Area); dict.Add("locality", ((CertInfo)Session["certInfo"]).LocalityOwner); dict.Add("address", ((CertInfo)Session["certInfo"]).StreetOwner); dict.Add("phone", acredAbonent.MemberPhone); dict.Add("fax", acredAbonent.Fax); dict.Add("email", acredAbonent.Email); dict.Add("site", acredAbonent.WwwSite); dict.Add("accountNumber", acredAbonent.AccountNumber); dict.Add("bankName", acredAbonent.BankNAme); dict.Add("bankCode", acredAbonent.BankCode); dict.Add("bankAddress", acredAbonent.BankAddress); dict.Add("date", DateTime.Now.ToString("dd.MM.yyyy")); dict.Add("fullName", ((CertInfo)Session["certInfo"]).OrganizationOwner); dict.Add("shortName", ((CertInfo)Session["certInfo"]).CNOwner); dict.Add("UNP", ((CertInfo)Session["certInfo"]).UNP); dict.Add("supreme", acredAbonent.Okogu); dict.Add("director", acredAbonent.BossLastName + " " + acredAbonent.BossFirstName); dict.Add("post", acredAbonent.BossPost); string path = ""; switch (typemember) { case 1: path = "/Content/static/StatementLegalPerson.rtf"; break; case 2: path = "/Content/static/StatementSoleTrader.rtf"; break; case 3: path = "/Content/static/StatementIndividual.rtf"; break; } String genDoc = TemplatesUtils.generateRTF(Server.MapPath("~") + path, dict); return Json(genDoc); }
/// <remarks/> public void GetAccredMemberInfoAsync(string SessionID, string SessionKey, int MemberID, TAccreditationAbonent AMemberInfo, TPersonAccrediataion APErson, TPersonAccrediataion[] APersonsList, TDocumentsList[] ADocList, object userState) { if ((this.GetAccredMemberInfoOperationCompleted == null)) { this.GetAccredMemberInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccredMemberInfoOperationCompleted); } this.InvokeAsync("GetAccredMemberInfo", new object[] { SessionID, SessionKey, MemberID, AMemberInfo, APErson, APersonsList, ADocList}, this.GetAccredMemberInfoOperationCompleted, userState); }
/// <remarks/> public void GetAccredMemberInfoAsync(string SessionID, string SessionKey, int MemberID, TAccreditationAbonent AMemberInfo, TPersonAccrediataion APErson, TPersonAccrediataion[] APersonsList, TDocumentsList[] ADocList) { this.GetAccredMemberInfoAsync(SessionID, SessionKey, MemberID, AMemberInfo, APErson, APersonsList, ADocList, null); }
public bool GetAccredMemberInfo(string SessionID, string SessionKey, int MemberID, ref TAccreditationAbonent AMemberInfo, ref TPersonAccrediataion APErson, ref TPersonAccrediataion[] APersonsList, ref TDocumentsList[] ADocList) { object[] results = this.Invoke("GetAccredMemberInfo", new object[] { SessionID, SessionKey, MemberID, AMemberInfo, APErson, APersonsList, ADocList}); AMemberInfo = ((TAccreditationAbonent)(results[1])); APErson = ((TPersonAccrediataion)(results[2])); APersonsList = ((TPersonAccrediataion[])(results[3])); ADocList = ((TDocumentsList[])(results[4])); return ((bool)(results[0])); }